Skip to content

Fix stale header comment in cli.test.ts#37

Open
toon-backlog-bot[bot] wants to merge 2 commits into
mainfrom
agent/36-fix-cli-test-header-comment
Open

Fix stale header comment in cli.test.ts#37
toon-backlog-bot[bot] wants to merge 2 commits into
mainfrom
agent/36-fix-cli-test-header-comment

Conversation

@toon-backlog-bot

Copy link
Copy Markdown
Contributor

Summary

Closes #36

packages/swap/src/cli.test.ts's header comment was left over from the file's RED-phase (TDD stub) origin and was no longer accurate:

  • It claimed "All describe/it blocks are .skip" — but cli.ts is fully implemented (285 lines, exports main()) and no test in the file is actually .skip'd.
  • It called the file packages/mill/src/cli.ts (line 1) and referenced packages/mill/src/cli.ts again in a later inline comment (line 89) — neither path exists in this repo (only packages/swap does).

This is a comment-only fix: no test logic, assertions, or behavior changed.

Deviation from the Agent Assessment plan: the issue scoped the edit to lines 1-13 (the header block), but the acceptance criteria requires the string packages/mill/src/cli.ts not appear anywhere in the file. A second occurrence existed at line 89 (an inline comment inside the "gap-fill" describe block, unrelated to the header). Fixed that reference too, since it's the same class of stale-comment issue and the AC's grep check would otherwise still fail.

Verification

$ grep -n "packages/mill/src/cli.ts" packages/swap/src/cli.test.ts   # no match
$ grep -n "All describe/it blocks are" packages/swap/src/cli.test.ts # no match
$ pnpm -r build   # succeeded
$ pnpm -r test    # 10 files, 130 passed | 2 skipped (pre-existing, unrelated)

Changeset added (empty — comment-only, no version bump) per repo convention.

The header claimed all tests were `.skip`'d and referenced a
non-existent local `packages/mill/src/cli.ts` path. Neither is true:
cli.ts is fully implemented and no test in the file is skipped.
Comment-only change; no test logic or assertions modified.

Closes #36

@ALLiDoizCode ALLiDoizCode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two accuracy issues remain in this diff — ironic given the PR's own purpose is fixing inaccurate comments.

1. packages/swap/src/cli.test.ts:89 — wrong line-number reference (real bug, not just doc polish)

The edited comment now reads:

// branches inside `applyEnvOverlay` (packages/swap/src/cli.ts:94-122).

Lines 94-122 of the current cli.ts are assertSafeKey/parseRawConfig, not applyEnvOverlay — that function actually lives at cli.ts:174-207. The PR fixed the package path (millswap) on this line but left the line range wrong, so the comment still misdirects a reader to the wrong function. Since this exact line was touched specifically to fix stale/inaccurate references, the fix is incomplete — please correct the range (or drop it and just name the function) rather than leaving a second inaccuracy in the same sentence.

2. .changeset/issue-36-fix-cli-test-header-comment.md — changelog text overclaims the fix

The changeset summary says:

"...fixes non-existent packages/mill and packages/town path references."

But the diff never touches the packages/town/src/cli.ts reference (still present, unchanged, at cli.test.ts:4) — and that reference isn't actually stale: packages/town is used consistently as a legitimate cross-repo pointer elsewhere in this codebase (cli.ts:7, mill.ts:19, vitest.integration.config.ts:7), unlike packages/mill, which was a real rename-orphaned path. The changeset (which becomes public changelog/release-note content per this repo's changesets-based publishing) should only claim what the diff actually does — please drop the "and packages/town" clause.

Everything else checks out: cli.ts is confirmed 285 lines and exports main() (matches the PR description), no .skip remains in the test file, and the packages/mill path references are genuinely gone. Comment-only change otherwise, no test logic/assertions modified.

- correct applyEnvOverlay line-number reference (94-122 was
  assertSafeKey/parseRawConfig; the function is actually at 174-212)
- drop the changeset's incorrect "and packages/town" claim — that
  reference was never touched by this PR and isn't stale

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@toon-backlog-bot

Copy link
Copy Markdown
Contributor Author

Addressed both points from the review in 0130f5b:

  1. cli.test.ts:89 line-range fix — corrected the applyEnvOverlay reference from cli.ts:94-122 (which is actually assertSafeKey/parseRawConfig) to cli.ts:174-212, the function's real location.
  2. Changeset overclaim — dropped the "and packages/town" clause from the changeset summary, since that reference was never touched by this diff and isn't stale (packages/town is used consistently elsewhere as a legitimate cross-repo pointer).

Verification re-run: pnpm -r build succeeded, pnpm -r test → 130 passed, 2 skipped (pre-existing, unrelated).

@toon-backlog-bot toon-backlog-bot Bot added the review-round:1 First review-fix iteration label Jul 2, 2026

@ALLiDoizCode ALLiDoizCode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff and verified all factual claims against the PR branch's actual files: cli.ts is 285 lines and exports main() (no truncation), no test in cli.test.ts is .skip'd, and applyEnvOverlay is indeed at lines 174-212. The remaining packages/town/src/cli.ts reference is legitimate (town is a real sibling repo in the toon-protocol org, per the multi-repo split noted in CLAUDE.md) — correctly left untouched, unlike the now-fixed packages/mill self-references (mill was this repo's old name). The second commit already self-corrected the changeset description's inaccurate 'and packages/town' claim per prior review feedback. Title and body accurately describe this comment-only change. No code or security issues found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-round:1 First review-fix iteration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix stale header comment in cli.test.ts (claims tests are .skip'd; they are not, and references non-existent packages/mill and packages/town paths)

1 participant