Repository navigation
fix(javascript): omit dynamic key names from structural fingerprints - #2968
rudycelekli wants to merge 3 commits into
Conversation
Signed-off-by: Rudy Celekli <[email protected]>
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30a450f7f6
ℹ️ 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".
| import type { ElectronStaticFindings } from "./electronStaticAnalysisTypes.js"; | ||
|
|
||
| /** Token semantics shared by bundle producers and worker admission. */ | ||
| export const JAVASCRIPT_AST_FINGERPRINT_ALGORITHM = "babel-ast-v2"; |
There was a problem hiding this comment.
Update the boundary expectation to babel-ast-v2
With this constant, every recovered module now reaches JavaScriptArtifactGraphBundlers.ts as babel-ast-v2, but the boundary case in tests/boundary/filesystem/javascript-applications/javascriptArtifactReconstruction.test.ts:364 still requires babel-ast-v1. That case is included by Vitest's boundary project, so npm run check:pr and the boundary suite deterministically fail after this version bump; update the boundary expectation as part of this change.
AGENTS.md reference: AGENTS.md:L25-L25
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 7fe73a0: the boundary expectation in javascriptArtifactReconstruction.test.ts now requires babel-ast-v2.
|
Signed-off-by: Rudy Celekli <[email protected]>
Preserve CommonJS literal paths and confined ESM URL semantics, including package main fallback, directory intent, Unicode identity, and present opaque modules. Parse extraction inputs at their AST/source owner, retain skipped HTML and source-map coverage, and distinguish endpoint candidates from proven receiver facts. Version structural fingerprints with computed literal contents and propagate them through worker contracts. Reviewed fixes include #1810, #1840, #2642, #2700, #2702, #2714, #2803, #2960, #2968, #2986, #3035, and #3036. Validation: 158 resolver tests passed; public CLI/MCP module lookup controls, package-main/Unicode workflows, and six builtin workflows passed in the current compiled lane. Worker schema/fingerprint regressions passed. Large public pdf.js completion and real Electron analysis remain unverified.
# Conflicts: # src/domain/javascript/javascriptAstFingerprint.test.ts # src/domain/javascript/javascriptAstFingerprint.ts
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
CI-fix track: the Windows lane failure (inspection conformance |
|
Heads up: main covers this in its own way in b58adaf. The code is in 🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
|
Closing: main already contains this change, so this PR is superseded. Thanks for the review. |
|
@rudycelekli, thanks for identifying that dynamic binding names should not destabilize rename-resistant fingerprints while computed access syntax must remain distinct from fixed access. The current versioned fingerprint representation carries the semantic form through worker admission and comparison (main). |
Renaming a local key in
value[key]currently changes its advertised rename-resistant bundle fingerprint; computed and fixed member access can also collide. Keep computed access syntax, omit the dynamic binding spelling, and retain template contents through their own AST tokens. Introduce one sharedbabel-ast-v2identity for producer, static types and worker admission. Retained v1/v2 values cannot structurally match; re-analyze both snapshots for v2 comparison. Exact factory source digests remain distinct. AI-assisted implementation and verification with OpenAI Codex; no linked issue because this came from a reproduced source audit.Verified against base
8fef2aa6:npm run check, test discovery and 43 focused/boundary/owned-worker tests pass; generated documentation checks also passed for the unchanged production contract. The committed worker-schema regression round-trips actual producer v2 facts and rejects v1 at the algorithm field; a mutant permitting v1 fails this test. The affected artifact graph boundary now expects v2 and passes after reproducing the stale v1 failure. Whole-repository version search leaves v1 only in intentional incompatibility documentation and the negative test. Actual compiled CLI and SDK stdio MCP comparisons show distinct source digests and matching v2 fingerprints for renamed keys, with Evidence parity, subsequent ping and cleanup. This is static JavaScript workflow verification, not human approval or an external-provider claim.