Skip to content

feat(examples): adopt semantic event route - #182

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
wave4/97-event-routes-example
Sep 1, 2026
Merged

feat(examples): adopt semantic event route#182
ScriptedAlchemy merged 1 commit into
mainfrom
wave4/97-event-routes-example

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • replace the demo's configured prebuilt Claude/Codex PostToolUse hooks with src/events/tool/after.tsx
  • keep the example's custom prebuilt MCP runtime honest by selecting explicit standalone event-route execution while sharing its durable state kernel
  • compile the same route into Claude and Codex native wrappers and move the ordinary micro-eval to the generated Claude artifact
  • replay checked-in host-shaped payloads as schema-conformance fixtures, explicitly not commercial-host dispatch evidence

Evidence table additions

Runtime coordination

  • No @agent-bundle/runtime package changes.

Test plan

  • pnpm eval:spot
  • pnpm --filter @agent-bundle/rsc-agent-runtime-demo exec rstest run tests/host-artifacts.test.ts --config rstest.config.ts (5 passed)
  • pnpm --filter @agent-bundle/rsc-agent-runtime-demo exec rstest run tests/docs-contract.test.ts --config rstest.config.ts (4 passed)
  • pnpm --filter @agent-bundle/rsc-agent-runtime-demo typecheck
  • pnpm lint

Replace the demo's configured prebuilt PostToolUse hooks with one filesystem event route and replay checked-in Claude and Codex envelopes through the generated native wrappers.
@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: da49cfc

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

@ScriptedAlchemy
ScriptedAlchemy merged commit 9004850 into main Sep 1, 2026
4 of 9 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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-01T19:46:06.890291Z da49cfc 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.

@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: da49cfc723

ℹ️ 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 +36 to +42
const snapshot = await createFileRuntimeKernel({ stateFile }).recordEdit({
host: normalized.host,
idempotencyKey: canonical.idempotencyKey,
path: normalized.path,
sessionId: normalized.sessionId,
toolName: normalized.toolName,
}, { signal });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore the launch probe on the packaged hook path

When eval:hosts -- --host claude runs a successful packaged hook, this route records state but never appends to AGENT_RUNTIME_HOOK_PROBE_FILE; the only writer remains src/hook/cli.ts, whose prebuilt hook declarations were removed from the package configuration. Consequently scripts/eval-hosts.mjs observes zero launches, classifies hook-dispatch and shared hook/MCP state as unavailable, and exits nonzero even when the route, edit, and MCP calls all succeed. Preserve the value-free probe on the new event-route execution path.

AGENTS.md reference: AGENTS.md:L10-L12

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in #196 (merged as 8c77ce6). The packaged event route now appends the same value-free probe line to AGENT_RUNTIME_HOOK_PROBE_FILE as the original hook CLI (shared writeEvalProbe in src/hook/eval-probe.ts; exitStatus: 0 on success, 1 on failure), so eval:hosts can observe packaged hook execution again. Covered by a route-unit test pinning the exact probe format.

ScriptedAlchemy added a commit that referenced this pull request Sep 1, 2026
…d hook route (#196)

PR #182 migrated PostToolUse to the semantic event route but dropped the
eval:hosts probe append that the prebuilt hook CLI still performed. Share
writeEvalProbe between both paths and cover the route-unit packaged route.
ScriptedAlchemy added a commit that referenced this pull request Sep 1, 2026
…e example's semantic event route (#182)

Both features merged while main CI was already red, so their outdated
sibling tests were never caught: normalizeHooks now orders hooks by
stable id, the rsc-agent-runtime example declares one tool/after event
route instead of per-host prebuilt hooks, and the workbench therefore
exposes the simulatable Hooks capability page.
ScriptedAlchemy added a commit that referenced this pull request Sep 1, 2026
… can go green (#197)

* test: align hook expectations with sorted normalization (#180) and the example's semantic event route (#182)

Both features merged while main CI was already red, so their outdated
sibling tests were never caught: normalizeHooks now orders hooks by
stable id, the rsc-agent-runtime example declares one tool/after event
route instead of per-host prebuilt hooks, and the workbench therefore
exposes the simulatable Hooks capability page.

* fix(ci): keep route-unit proofs out of the example plain test pool

* fix(ci): defer to the mainline Skill IR digest canonicalization (#191)
@ScriptedAlchemy
ScriptedAlchemy deleted the wave4/97-event-routes-example branch September 3, 2026 05:29
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.

1 participant