fix(config): review follow-ups from #135/#143 - #165
Conversation
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
|
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. |
Summary
Unresolved Codex review findings on merged #135 (static config extraction) and #143 (script routes), all three verified real against main:
routes/config-extract.ts):export const config = { limit: 1e999 }extractedInfinity, whichstableJsondigesting and inspection serialize asnull— indistinguishable from{ limit: null }. Numeric literals (plain and unary-wrapped) now go through aNumber.isFinitecheck and non-finite results raise the AB4806 dynamic-config diagnostic namingthe non-finite number \Infinity``.__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)), whichstrict-jsonrecord checks already accept, so the key stays an ordinary own data property..jsxdiscovery (routes/graph.ts): the scripts glob scanned only*.{ts,tsx}, making the'rendered'judgment for.jsxunreachable — asrc/scripts/foo.jsxsilently vanished instead of erroring. The glob now includes.jsx, andscriptKindOfparses.jsxmodules as JSX during config extraction.Coverage
route-config-extract.test.ts: rejection-table rows for1e999/-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:.jsxscript discovery lands ingraph.scriptswith conventional provenance.normalization.test.ts:.jsxfixture added to the AB4807–AB4809 gate test, asserting the full AB4807 diagnostic.Validation
rstestscoped to the three touched suites: 77 tests, 0 failurespnpm typecheck: clean (after@agent-bundle/runtimeprebuild)pnpm lint: 0 errors, 0 warnings