Skip to content

D3 F1 follow-up — bind computed network keys by symbol - #66

Merged
LogicDuke merged 3 commits into
repair/pr64-f1-computed-network-membersfrom
repair/pr65-p2-const-binding-identity
Aug 30, 2026
Merged

D3 F1 follow-up — bind computed network keys by symbol#66
LogicDuke merged 3 commits into
repair/pr64-f1-computed-network-membersfrom
repair/pr65-p2-const-binding-identity

Conversation

@LogicDuke

Copy link
Copy Markdown
Owner

Stack

Protected feature parent:

Network-purity parent:

Affected F1 parent:

This 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:

function f() {
  const Infinity = 'fetch';
}
void (globalThis as any)[Infinity];

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:

  • genuine same-symbol computed fetch / WebSocket rejection
  • literal and concatenated static-member resolution
  • fail-closed handling of indeterminate global keys
  • RC/HA existing conservative text-only policy
  • F2 reflective-socket finding
  • F3 label finding
  • EventSource deferral
  • node:http/export policy
  • socket Rule A/A2/B

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:

0a1a94fc16e345376f572363757a0fe4c0bcc42b

Changed file exactly:

tests/cockpit-host/purity.test.ts

Validated patch:

  • SHA256: 57583FBE7C854F21FD29F28C4FF9207963D4F343F46749BCAA213EF3243BA52C
  • Bytes: 12350

Independent validation:

PASS_PR65_P2_CONST_BINDING_IDENTITY_INDEPENDENT_VALIDATION

Full suite:

  • 2368 passed
  • 8 skipped
  • 0 failed

Typecheck, lint, build, and git diff --check: PASS

Authority

This PR is DRAFT.

It is evidence/proposal only.

It is NOT authorized for Ready or merge yet.

Human merge authority is preserved.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N6vGgvRSKBesMRt15DqZhn
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 17f2e9b7-43cd-4f1d-b300-a54442257d5d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@LogicDuke
LogicDuke marked this pull request as ready for review August 29, 2026 21:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread tests/cockpit-host/purity.test.ts Outdated
Comment on lines +1360 to +1362
const value = constMap.get(n.text);
if (value === undefined) return null;
return bindsToCollectedConst(n, checker) ? value : null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 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-08-30T08:08:32.390386Z f2da06a Manual request
ℹ️ 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.

@LogicDuke
LogicDuke marked this pull request as draft August 29, 2026 21:29
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N6vGgvRSKBesMRt15DqZhn
@LogicDuke
LogicDuke marked this pull request as ready for review August 29, 2026 22:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread tests/cockpit-host/purity.test.ts Outdated
Comment on lines +1421 to +1423
new Set<ts.Declaration>(),
new Map<ts.Declaration, string | null>(),
budget,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@LogicDuke
LogicDuke marked this pull request as draft August 30, 2026 06:35
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N6vGgvRSKBesMRt15DqZhn
@LogicDuke
LogicDuke marked this pull request as ready for review August 30, 2026 08:01
@LogicDuke

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: f2da06abe3

ℹ️ 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".

@LogicDuke
LogicDuke merged commit df55f27 into repair/pr64-f1-computed-network-members Aug 30, 2026
2 checks passed
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