feat(config): ship conventional src/scripts/ modules through the scripts pipeline (#102 stage 1) - #143
Conversation
🦋 Changeset detectedLatest commit: aeeab2e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…pts pipeline (#102 stage 1) Unclaimed plain .ts modules directly under src/scripts/ now normalize from the compiled route graph into the existing explicit-scripts build pipeline (scripts/<name>.mjs per selected target, provenance.kind 'conventional'). Explicit scripts config keeps claiming its files; rendered (.tsx), nested, and identity-conflicting script routes fail source validation with the new AB4807-AB4809 diagnostics instead of shipping silently. The hooks-and-scripts example moves verify-release to conventional discovery and keeps detect-risk explicitly configured, covering both modes.
commit: |
56336b1 to
aeeab2e
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56336b15fe
ℹ️ 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".
Codex review follow-ups on the static route-config extractor and script route discovery: - reject non-finite numeric literals (`1e999`, `-1e999`) with the AB4806 dynamic-config diagnostic instead of serializing Infinity as null - carry extracted object literals on a null prototype so a literal `__proto__` key stays an own property instead of invoking the legacy prototype setter - discover `.jsx` under src/scripts/ so rendered .jsx scripts reach the AB4807 gate instead of vanishing, and parse .jsx modules as JSX during config extraction
Summary
Wave 2 Lane D — #102 stage 1 (plan: #107 rev 2). Plain
src/scripts/discovery now feeds the existing entry machinery.normalizeScripts(config/normalize.ts) now consumes the compiled route graph'sscriptssurface (feat: compile route-graph IR and inspect focus (#93) #119's discovery — no second discovery pass) beside explicitscriptsconfig. Shippable conventional routes become ordinaryNormalizedScripts withprovenance.kind: 'conventional'and flow through the untouchedplanCompiledEntries/compileEntriespipeline toscripts/<name>.mjsper selected target — identical layout, envelope (mainexport), and validation as explicitly configured scripts.config/script-routes.ts): normalize ships exactly theshippableroutes; source validation reports every other state as a hard error, so no discovered script route ever drops silently:AB4807rendered (.tsx/.jsx— Generate CLI, MCPorter, and script projections from the compiled route graph #102 stage 3, honest "not supported yet"),AB4808nested below the scripts root (the flat scripts artifact layout ships direct children only),AB4809identity conflict with a configured script name (config claims by file stay authoritative per the route graph; same-identity-different-file never picks a side).src/cli.ts-vs-src/cli/conflict diagnostics (AB4801) stay untouched and authoritative.examples/hooks-and-scriptsmovesverify-releaseto conventional discovery and keepsdetect-riskexplicitly configured (it restricts targets), so both modes stay covered. Explicit-vs-conventional artifact diff:scripts/*.mjsbyte-identical across all three targets; the only manifest delta isagent-bundle.config.tsdropping out of the conventional script's sourceInputs (honest provenance).AB4800–AB4809); patch changeset. No wire-DTO changes (inspect script DTO unchanged), no public API surface changes.Scoped results (rebased on c9206d0)
pnpm typecheck✓pnpm lint✓ (0 errors, 693 files)verify-release.mjsfrom conventional discovery)pnpm --filter @agent-bundle-example/hooks-and-scripts check✓Closes nothing; advances #102 (stage 1 of 4).