fix: address 14 analysis and governance review bugs (#48–#61) - #65
Merged
Conversation
Problem: Boundary checks could miss public API changes, loader origins, URL authorities, overflowed alternatives and supported routes. Ownership, coverage and Python dependency reporting could disagree with runtime behavior. Change: Fix the fourteen reviewed cases (#48–#61), add regression tests with Node and Python oracles, and correct baseline adoption documentation. Behavior: Known references resolve from their actual origin; unsupported loader flow and incomplete resource analysis fail closed. Explicit head refs analyze committed snapshots. Ownership and coverage use consistent exclusions and directory semantics. Tests: Full test suite: 1,182 passed, 2 skipped, 0 failed. Build, lint and typecheck passed. Scoped mutation is running. Known-Gaps: Self-check requires review and re-signing of the accepted engine baseline after correcting public API hashing. The signed baseline and verification policy are preserved. Mutation verification is pending. Change-Type: implementation Changed-Cells: cli,engine,plugin-blast-radius Tests-Added: tests/bug-fixtures.mjs Tests-Modified: tests/module-resolution.test.mjs,tests/official-plugins.test.mjs,tests/resource-access-coverage.test.mjs,tests/review-regressions.test.mjs Test-Impact: Regression tests cover all fourteen reviewed cases with runtime resolution oracles where applicable. Tests-Not-Added-Reason: Regression tests were added for all reviewed cases. Agent-Run-Id: cellfence-review-fixes-2026-09-06 Agent-Task-Id: fix-review-bugs-48-61
Owner
Author
|
@pushnanashi2 Leaving this draft unmerged for now. It is behind |
Problem: Resource mutation checks exposed untested malformed URL combinations and candidate-product overflow. Loader regression coverage needed direct factory, bound alias and exact fail-closed diagnostics. Change: Remove the redundant URL argument fallback and add focused regression cases for URL failures and loader origins, preserving concurrent regression fixes. Behavior: Malformed or overflowing URL alternatives cannot produce a partially approved result. Supported loader origins remain precise and unsupported loader flows report stable diagnostics. Tests: The latest 131 targeted tests, build and signed-baseline self-check pass. Resource-access mutation scored 100% in a forced full scope run. Module-resolution mutation is still running. Known-Gaps: The remaining module-resolution mutation result and latest cross-platform CI are pending. Change-Type: implementation Changed-Cells: engine Tests-Added: none Tests-Modified: tests/module-resolution.test.mjs,tests/resource-access-coverage.test.mjs Test-Impact: Cover malformed URL alternatives, URL Cartesian overflow, direct createRequire calls, bound aliases, and exact unsupported-loader diagnostics. Tests-Not-Added-Reason: Existing regression suites were extended. Agent-Run-Id: cellfence-review-fixes-2026-09-06 Agent-Task-Id: fix-review-bugs-48-61
Problem: Mutation probes found gaps around non-URL import metadata, new.target, unknown URL inputs or bases, and declaration tokens adjacent to removed internal declarations. Change: Add focused origin and declaration regressions. Simplify missing URL arguments and redundant catch returns without changing unresolved behavior. Behavior: Only supported file origins resolve. Removing an internal declaration preserves the whitespace needed to separate adjacent public type tokens. Tests: All 131 targeted tests, build, lint and signed-baseline self-check passed after this change. Six previously surviving injected mutations are detected by the strengthened tests. Twelve selected authoritative mutation scopes passed at 100%; final module-resolution mutation and latest CI remain pending. Known-Gaps: The PR stays in draft until final mutation and CI validation complete. No repository-wide mutation score is claimed. Change-Type: implementation Changed-Cells: engine Tests-Added: none Tests-Modified: tests/module-resolution.test.mjs Test-Impact: Cover exact adjacent declaration output and unsupported origin expressions, and verify six injected regressions are rejected. Tests-Not-Added-Reason: Existing regression tests were extended. Agent-Run-Id: cellfence-review-fixes-2026-09-06 Agent-Task-Id: fix-review-bugs-48-61
aoto-tech
marked this pull request as ready for review
September 7, 2026 23:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Boundary analysis could return success after dropping relevant declarations, loader origins, URL authorities, or resource candidates. Other review findings showed inconsistent ownership, coverage counts, Python resolution, and baseline adoption guidance.
This PR fixes the 14 reviewed cases and adds executable regressions. It remains a draft while the full PR CI, including changed-scope mutation testing and the platform matrix, completes on the latest head.
@internaldeclaration spans so adjacent public signatures remain in the hash.createRequireorigin through aliases and call/apply forms; unresolved origins fail closed.Latest repair — 2026-09-08 JST
Commit
ae7ff86e91104210d7dc9e897a60ad997a6c1005integratesmainatede709489d4930339d7f8740e7f011e4708481a4and addresses the remaining module-resolution mutation gaps..ts,.mts, and.ctsdeclaration emission; retain the existing declaration-file regression.kind/typeOnlymetadata of imports resolved from a differentcreateRequireorigin.tomllibandtypesadditions. Main's regression tests are included and pass.Verification at the latest repair commit
The isolated verification run checked out and tested the detached commit
ae7ff86e91104210d7dc9e897a60ad997a6c1005before it was fast-forwarded onto this PR. The temporary verification workflow and helper are not part of this PR's tree.npm test, including build, on Ubuntu / Node 20 / Python 3.12cmd.exe.npm run lintnpm run typechecknpm run cellfence:self-checkgit diff --checkand clean tracked working-tree verificationThe focused mutation result covers
requireOrigin,requireBindingForExpression,addUnsupportedRequireWarning,addRequireCallReference, andsourceTextWithoutInternalDeclarations. It is not a whole-module or repository-wide mutation score.The full PR CI rerun was started on the updated PR head. Its changed-scope mutation result and complete OS/Node matrix were still pending when this verification note was written; the focused result above does not replace those checks.
Regression checks also exercise Node/Python runtime resolution, URL authority, the 16/17 candidate boundary, caller worktree preservation, claims, coverage exclusions, dependency ratchets, and empty Changed-Cells.
Public-surface compatibility
The import origin is internal analysis metadata, and the hashing helper is internal to the module. Keeping those implementation details out of the public declarations resolved the initial signature mismatch. The accepted signed baseline, signing key, verification policy, fixture outcomes, and mutation thresholds remain unchanged; baseline migration is not required by the current self-check.
Python 3.10+ supplies complete stdlib metadata; older runtimes without it recognize builtin modules conservatively. Resource candidate overflow and unsupported loader flow produce unresolved findings instead of a partial success.
Closes #48
Closes #49
Closes #50
Closes #51
Closes #52
Closes #53
Closes #54
Closes #55
Closes #56
Closes #57
Closes #58
Closes #59
Closes #60
Closes #61