Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

session: performs no topic resolution - writes session and draft files for topic IDs that do not exist

Closed Beginner friendly
#302 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #422 by @Kuldeep2822k — merged

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
nodejs, typescript
Domain
cli

Research direction

Start with resolveSessionTopic() in src/cli/session.ts (around lines 41-48), which returns the trimmed argument without checking the vault. Read how review and assess resolve topics and reuse that lookup, so an unknown ID fails with exit 2 and lists candidates. Reproduce with session start --topic T-does-not-exist-999 and review T-does-not-exist-999 3. Done when the session commands reject the phantom ID without writing files and a valid topic still works.

Written by the indexing model from the issue text.

Description

bug core priority: high tests

Summary

session start/draft/end accept any non-empty string as a topic. review rejects the identical string. A learner can build a full session history against a topic that does not exist.

Repro

Vault with one adopted note. T-does-not-exist-999 is not a topic anywhere:

command exit output
session start --topic T-does-not-exist-999 0 === PALEE Session Started ===
session draft --topic T-does-not-exist-999 0 ✓ Draft checkpoint created: DRAFT-S-5c24f0ce
session end 0 ✓ Session recorded: S-20261009T224403-67f8
review T-does-not-exist-999 3 2 Error: No topic found matching "T-does-not-exist-999"

Real files were written under .palee\sessions\ for the phantom ID.

Expected

session resolves the topic against the vault, the way review/assess do, and fails closed at exit 2 with the candidate list.

Where

src/cli/session.ts:41-48 — resolveSessionTopic() returns the trimmed argument verbatim whenever it is non-empty and not (none). It never consults the vault; the vault lookup below it only runs when no explicit topic was passed.

Environment
  • palee 0.6.0, local build from main at 02dacd0 (installed as palee-test; reproduce with palee)
  • Node v24.19.0, Windows 11 x64, Git Bash
  • Vault: MIT-licensed Microsoft/OSSU curriculum markdown, 21-187 notes per vault
  • Every command below was run for real; exit codes captured by command substitution (never $? after a pipe)
Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
23h 24m
Merged PRs (30d)
142

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Kuldeep2822k/cli

All issues in Kuldeep2822k/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.