D3 F1 follow-up — bind computed network keys by symbol - #66
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N6vGgvRSKBesMRt15DqZhn
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a1a94fc16
ℹ️ 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".
| const value = constMap.get(n.text); | ||
| if (value === undefined) return null; | ||
| return bindsToCollectedConst(n, checker) ? value : null; |
There was a problem hiding this comment.
Bind identifiers inside collected constant initializers
The binder gate validates only the final element-access identifier, while its value has already been recursively computed by the text-only collectStringConsts. For example, function f(){ const Infinity = 'fetch'; } const key = Infinity; void globalThis[key]; makes key resolve to its own const and pass this check, but the initializer's out-of-scope Infinity is incorrectly folded from the inner const, so this benign access is still reported as outbound networking. The collected representation must retain and validate binding identity throughout initializer resolution, not only at the outer key reference.
Useful? React with 👍 / 👎.
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. |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N6vGgvRSKBesMRt15DqZhn
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7b4fa6b73
ℹ️ 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".
| new Set<ts.Declaration>(), | ||
| new Map<ts.Declaration, string | null>(), | ||
| budget, |
There was a problem hiding this comment.
Share the declaration memo across member resolutions
When a source uses the same N-declaration const chain in M computed accesses, constructing a fresh memo here makes every access traverse the chain again, producing Θ(M×N) binder work; the visitor also invokes this for element accesses on unrelated receivers. The previous collectStringConsts path resolved each declaration once per source, so generated or growing host code with repeated computed keys can now make the purity test disproportionately slow, while the per-resolution visit cap does not limit the cumulative work. Keep the declaration-result cache for the whole usesOutboundNetwork traversal rather than recreating it for each member.
Useful? React with 👍 / 👎.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N6vGgvRSKBesMRt15DqZhn
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
df55f27
into
repair/pr64-f1-computed-network-members
Stack
Protected feature parent:
cockpit/d3-readonly-dashboard-host5ae2b786ad6dc4653286d4c2b50e1fd705daa974Network-purity parent:
repair/d3-network-egress-purityb5b07a38be7c809cd01a059a638c1917e4e972cfAffected F1 parent:
repair/pr64-f1-computed-network-members8e32c7fbb1eb15121cc35c48d6b778998f03516bThis PR is a quarantined stacked follow-up repair.
Finding
CURRENT / P2 — computed global-network const substitution used identifier text without proving binder identity.
A same-named const in another lexical scope could be substituted for an unrelated identifier reference, producing a false-positive network capability.
Verified example:
The outer Infinity does not resolve to the inner const, but the prior NET static-string path could synthesize "fetch" from identifier text.
Bounded repair
The NET-specific computed-global-member path now requires TypeScript binder identity before substituting an Identifier-backed collected const.
The repair preserves:
No handwritten scope engine, taint analysis, alias propagation, type-resolution expansion, whole-program analysis, module graph analysis, fixpoint, or runtime sandbox was introduced.
Exact identity
Head commit:
0a1a94fc16e345376f572363757a0fe4c0bcc42bChanged file exactly:
tests/cockpit-host/purity.test.tsValidated patch:
57583FBE7C854F21FD29F28C4FF9207963D4F343F46749BCAA213EF3243BA52C12350Independent validation:
PASS_PR65_P2_CONST_BINDING_IDENTITY_INDEPENDENT_VALIDATIONFull suite:
Typecheck, lint, build, and
git diff --check: PASSAuthority
This PR is DRAFT.
It is evidence/proposal only.
It is NOT authorized for Ready or merge yet.
Human merge authority is preserved.