Skip to content

fix(config): review follow-ups from #135/#143 - #165

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
fix/review-config-extract
Sep 1, 2026
Merged

fix(config): review follow-ups from #135/#143#165
ScriptedAlchemy merged 1 commit into
mainfrom
fix/review-config-extract

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

Unresolved Codex review findings on merged #135 (static config extraction) and #143 (script routes), all three verified real against main:

  • feat: statically extract route config exports into the route-graph IR (#93, PR-2) #135 / non-finite numbers (routes/config-extract.ts): export const config = { limit: 1e999 } extracted Infinity, which stableJson digesting and inspection serialize as null — indistinguishable from { limit: null }. Numeric literals (plain and unary-wrapped) now go through a Number.isFinite check and non-finite results raise the AB4806 dynamic-config diagnostic naming the non-finite number \Infinity``.
  • feat: statically extract route config exports into the route-graph IR (#93, PR-2) #135 / __proto__ collapse (routes/config-extract.ts): assigning a literal "__proto__" key through a plain {} carrier invoked the legacy prototype setter, so the declared property vanished from inspection and the digest matched an empty config. Extracted object literals now build on a null-prototype carrier (Object.create(null)), which strict-json record checks already accept, so the key stays an ordinary own data property.
  • feat(config): ship conventional src/scripts/ modules through the scripts pipeline (#102 stage 1) #143 / .jsx discovery (routes/graph.ts): the scripts glob scanned only *.{ts,tsx}, making the 'rendered' judgment for .jsx unreachable — a src/scripts/foo.jsx silently vanished instead of erroring. The glob now includes .jsx, and scriptKindOf parses .jsx modules as JSX during config extraction.

Coverage

  • route-config-extract.test.ts: rejection-table rows for 1e999 / -1e999, an own-__proto__ preservation test (own descriptor, key enumeration, JSON serialization, frozen), and a .jsx-with-JSX-body parse test.
  • route-graph.test.ts: .jsx script discovery lands in graph.scripts with conventional provenance.
  • normalization.test.ts: .jsx fixture added to the AB4807–AB4809 gate test, asserting the full AB4807 diagnostic.

Validation

  • rstest scoped to the three touched suites: 77 tests, 0 failures
  • pnpm typecheck: clean (after @agent-bundle/runtime prebuild)
  • pnpm lint: 0 errors, 0 warnings

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
@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 484f15b

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 70ef8ab 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-01T18:13:30.315349Z 484f15b 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.

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