Skip to content

test(dev): pin absent nested route discovery (#717) - #720

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
fix/issue-717-watcher-roots
Sep 6, 2026
Merged

test(dev): pin absent nested route discovery (#717)#720
ScriptedAlchemy merged 1 commit into
mainfrom
fix/issue-717-watcher-roots

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Pin the foreground dev server's existing project-root watcher behavior when src/events/** and src/mcp/*/tools/** do not exist at startup.
  • Create and delete a standalone sessionStart route, asserting one published epoch adds/removes both Claude and Codex hook outputs.
  • Repeat the same signal-driven flow for an initially absent MCP tool root and assert its generated server output is added and removed.

Closes #717.

Root-cause disposition

Fresh source at the reported b435f7b917 already watches the project root and passes the reported flow without a route-kind watcher. The original live command launched the ignored built dist without a matching full build; after pnpm build, the same audiobook example observed src/events/session/start.ts immediately and emitted both hook wrappers. Adding a second watcher path would duplicate the existing root watcher, so this PR records the missing acceptance instead of manufacturing a production change.

No changeset or en/zh docs update: this is test-only and changes no published behavior.

Local gate

  • pnpm build && pnpm typecheck && pnpm lint && pnpm test:unit — passed; unit pool: 4,405 passed, 6 skipped.
  • Full 13-file watcher/dev-server integration pool — passed; 75 passed, 2 native opt-in skips.
  • Focused absent-root test — passed; five artifact publications (initial, event add/delete, MCP add/delete), no polling or sleeps.
  • Fresh live examples/audiobook-curator dev session — SSE observed the nested route invalidation and the active manifest contained Claude/Codex sessionStart hooks.

Deslop

Deslop: GPT-5.6 Sol, 1 edit. Collapsed fixture setup onto the existing project-fixture helper and removed a bespoke timeout wrapper.

Self-review

Reviewer: Claude Fable 5.1 Thinking High (change-risk-reviewer).

  • First pass: no merge-blocking risks. Two notes: optional timeout diagnostics and a theoretical mkdir/writeFile debounce race.
  • Disposition: timeout handling follows this file's shared within helper and build errors remain in Rstest output; the separate directory/file writes intentionally reproduce Dev watcher misses routes created inside a previously absent nested directory #717, and an early empty publication fails the immediate manifest assertion rather than false-passing.
  • Second pass: no blocker or warning findings remain.

@changeset-bot

changeset-bot Bot commented Sep 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ffa7d5c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T22:49:39.523487Z ffa7d5c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ScriptedAlchemy
ScriptedAlchemy merged commit b805eec into main Sep 6, 2026
5 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the fix/issue-717-watcher-roots branch September 6, 2026 22:46

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ffa7d5c07d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +529 to +531
const publications = Array.from({ length: 5 }, () => Promise.withResolvers<string>());
const publication = (index: number): Promise<string> =>
within(publications[index]!.promise, 20_000 * timeScale);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clear publication timeout timers after each event

Each successful publication() call races against the file-local within timer but never clears that losing timer, so this test leaves five referenced timers active. In CI, timeScale is 4, making each timer 80 seconds and allowing the final one to delay worker shutdown for roughly 80 seconds after the test finishes; tests/support/eventually.ts already provides a within implementation that clears its timer in finally specifically to avoid this suite-shutdown stall.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dev watcher misses routes created inside a previously absent nested directory

1 participant