Repository navigation
Conversation
Part of #9881. Record every numeric REA_ limit and fail static checks when one is neither a runtime analysis setting nor a documented exception with a reason.
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11839a2ef8
ℹ️ 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".
…tions The numeric-limit check now treats REA_WEB_BUNDLE_ENDPOINT_LITERAL_CANDIDATES as a count limit and does not count registry text as a producer.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 972d652483
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Discovery no longer treats comments or registration-list entries as producers. The three limits moving on their own PRs must join ANALYSIS_SETTINGS; the exception registry cannot classify them.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42f42c1ffc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
A quoted name after an identifier, call, or optional chain is a producer. Only declaration arrays and comments stay out of discovery.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a7fbfdd21
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Property access, element access, and helper-call arguments are producers. Comments and array literals are excluded by the tree, so a later argument such as read(environment, "REA_NEW_MAX_BYTES") stays classified.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e603982ddd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (ts.isVariableDeclaration(node) && node.initializer !== undefined) | ||
| remember( | ||
| discovered, | ||
| relativePath, | ||
| literalText(unwrapExpression(node.initializer)), |
There was a problem hiding this comment.
Inspect destructured environment keys
When a new limit is read through destructuring, such as const { REA_NEW_MAX_BYTES } = environment, the limit name is stored in the variable declaration's binding pattern rather than its initializer. This branch inspects only the initializer, and the visitor has no handling for binding elements, so discoverNumericLimitUses returns no entry and the verifier permits the limit without either an analysis setting or registry classification. Handle destructured property names as producer reads as well.
AGENTS.md reference: AGENTS.md:L27-L27
Useful? React with 👍 / 👎.
Summary
Part of #9881. Every numeric
REA_limit is listed with its owner, default, floor, maximum, when it is read, and its classification. Static checks fail when a new numericREA_limit is neither a runtime analysis setting nor on that list with a reason.Discovery uses the TypeScript parser (
typescript6). A producer is a property access, an element access, or an argument to a call, including a same-file const string. Comments and array literals are not producers because they are not those nodes. A later helper argument such asread(environment, "REA_NEW_MAX_BYTES")stays classified.Problem and expected behavior
Runtime analysis settings cover 17 values. Other numeric
REA_limits are still read from the launch environment, and nothing stopped a new one from landing without a classification. The inventory records 14 runtime environment seeds, 11 per-call limits that still use the launch value, and 15 restart-only numeric limits.REA_NTFS_MFT_MAX_FILE_BYTES(#9868),REA_REGF_HIVE_MAX_FILE_BYTES(#9865), andREA_WEB_BUNDLE_ENDPOINT_LITERAL_CANDIDATES(#9836) are absent from this tree and must joinANALYSIS_SETTINGSonce they appear. The exception registry cannot classify them.Change and scope
The narrative inventory is
docs/design/rea-limit-inventory.md.src/domain/numericLimitRegistry.tsis the machine-readable exception list.scripts/verify/rea-numeric-limits.mjsscanssrc(tests excluded) and runs fromnpm run lint.policy: "per-call"is temporary. Those 11 limits are checked when the work runs and still copy the launch value. Durable exceptions usepolicy: "restart-only".Follow the contribution scope. Ordinary classification of existing limits; no new provider, target execution, injection, mutation, or protection recovery. Maintainer scope decision: not applicable.
Contract and boundary impact
Expected effects:
Evidence and regression coverage
tests/evaluation/numericLimitCheck.test.tscovers property access, registry text, a later helper argument, a bound argument, bracket access, allowlists, comments, and prose that merely mentions a name.node scripts/verify/rea-numeric-limits.mjsreports 14 runtime, 15 restart-only, 11 per-call, 40 discovered.Validation performed
npm run check:fast— passed.npm run test:focused -- tests/evaluation/numericLimitCheck.test.ts— passed (7 tests).node scripts/verify/rea-numeric-limits.mjs— passed: 14 runtime, 15 restart-only, 11 per-call pending migration, 40 discovered.Compatibility, safety, and release
REA_limit that is unclassified.Author readiness
Human owner: @morluto
Before merge
type(scope): outcome.