Skip to content

fix(build): register the standalone function-bundle verifier with Knip - #9300

Closed
2SinceJuly wants to merge 1 commit into
morluto:mainfrom
2SinceJuly:fix/9295-knip-function-bundle-verifier
Closed

2SinceJuly wants to merge 1 commit into
morluto:mainfrom
2SinceJuly:fix/9295-knip-function-bundle-verifier

Conversation

@2SinceJuly

Copy link
Copy Markdown
Contributor

Summary

Fixes #9295.

npm run knip exits 1 on main at 015a02d57b567bc9a1ed792d1e4b3ec083fa0ae3 with a single Unused files (1) diagnostic for scripts/verify-real-ghidra-function-bundle.mjs, which also stops npm run check at its Knip task.

Problem and expected behavior

Trigger: run npx knip --cache on 015a02d57. knip.json globs scripts/**/*.mjs into the project, so every standalone .mjs verifier has to be listed in entry or it is reported as unused. scripts/verify-real-ghidra-function-bundle.mjs was added by #8873 and documented in tests/conformance/ghidra/README.md:6-10 as a manual entrypoint, but it was never added to the entry list.

Expected: the static gate recognizes the verifier the same way it recognizes verify-real-ghidra-noreturn.mjs, verify-real-ghidra-decompiler-failure.mjs and verify-real-ghidra-decompile-timeout.mjs, all of which are entry-only too — none of them has a package.json script or workflow caller.

Change and scope

One line in knip.json: add scripts/verify-real-ghidra-function-bundle.mjs to entry next to the three existing standalone Ghidra verifiers.

Follow the contribution scope. This is an ordinary build-config fix within existing boundaries; no maintainer scope decision applies, and no new capability is introduced.

Contract and boundary impact

  • Semantic owner and earliest changed stage: unchanged. knip.json remains the declaration of static-gate entrypoints; no source file changed.
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: unchanged.
  • Provider, bridge, target-format, or platform compatibility: unchanged.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged.
  • Target selection, authority, upstream behavior, and cleanup details: not applicable.
  • Generated metadata: none.

Expected effects: documentation or usability only; no target interaction. Only the static-check configuration changes.

Evidence and regression coverage

  • Tests added or updated: none. The existing tests/boundary/filesystem/staticTaskCache.test.ts and tests/boundary/filesystem/ciCachePolicy.test.ts already hash knip.json as a cache input; both were re-run unchanged and still pass.
  • Base reproduction: on 015a02d57 before the change, npx knip --cache printed Unused files (1) / scripts/verify-real-ghidra-function-bundle.mjs and exited 1.
  • After the change: the same command prints nothing and exits 0.
  • User-visible CLI/MCP output: none; no production code changed.
  • Remaining proof gaps: the verifier itself was not executed — it needs GHIDRA_INSTALL_DIR and JAVA_HOME, which are not available here. This change only registers its reachability, exactly as the issue scoped it.

Boundary regression applicable here: static-gate task caching keyed on knip.json. No lifecycle regression applies.

Validation performed

  • npx knip --cache on the base revision — exit 1, Unused files (1) scripts/verify-real-ghidra-function-bundle.mjs.
  • npx knip --cache with this change — exit 0, no output.
  • npx oxfmt --check knip.json — "All matched files use the correct format."
  • npx vitest run tests/boundary/filesystem/ciCachePolicy.test.ts tests/boundary/filesystem/staticTaskCache.test.ts — 26/26 passed.
  • npm run check:fast — typecheck and lint successful (2 tasks, 8.2s).

Not run: the full npm run check chain (jscpd, scan:todos, knip:production, typed lint, test suite), and the function-bundle verifier itself.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: none; the verifier was not run.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none; build-config-only change.

Author readiness

Human owner: @2SinceJuly

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

scripts/verify-real-ghidra-function-bundle.mjs is a manually run
conformance entrypoint documented in tests/conformance/ghidra/README.md,
but it was missing from the explicit Knip entries. The scripts/**/*.mjs
project glob therefore reported it as unused, so npm run knip exited 1
and npm run check stopped at the Knip task on main.

The other standalone Ghidra verifiers (noreturn, decompiler-failure,
decompile-timeout) are registered the same way, and none of them have
a script or workflow caller either.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T22:58:26.039826Z e56a624 PR opened
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

Adds scripts/verify-real-ghidra-function-bundle.mjs to knip.json so Knip recognizes the documented manual entrypoint.

  • Knip counts the function-bundle verifier as a starting point.

Reviews (1) · Last reviewed commit: "fix(build): register the standalone func..." · Reviewed by Greptile

isavens commented Nov 8, 2026

Copy link
Copy Markdown

Independent Windows validation for #9295. The tested local diff matches PR #9300 at e56a6245c886a9686177317ac0bda67dcada1324: one entry added to knip.json.

Windows, Node 24.22.1, npm 11.16.0, Knip 6.39.0. Ran npm.cmd run compile on base 015a02d57b56 (exit 0). Both Knip runs used the same compiled inputs and each started with a separate empty cache.

State Command Observed result
Before the fix npm.cmd run knip -- --cache-location node_modules/.cache/rea-9295/baseline Exit 1. The only diagnostic was Unused files (1) for scripts/verify-real-ghidra-function-bundle.mjs.
With the one-line fix npm.cmd run knip -- --cache-location node_modules/.cache/rea-9295/fixed Exit 0, no diagnostics.

git diff --check passed. This validates the static gate on Windows. The Ghidra verifier itself and the full npm run check chain were not run.

@2SinceJuly

Copy link
Copy Markdown
Contributor Author

Appreciated — that closes the one platform gap I could not cover. Your run pins exactly what the change claims: Unused files (1) for scripts/verify-real-ghidra-function-bundle.mjs before, exit 0 after, same compiled inputs, separate empty caches.

Recorded as the independent Windows evidence for #9295. The Linux side is already green on this head, so the static gate is now covered on both platforms. Noted that the Ghidra verifier itself and the full npm run check chain remain unrun here — that matches what the PR body claims, so nothing to change.

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The exact verifier path added here is already listed in knip.json on main from #9332. Please close this as superseded unless there is a separate Knip failure on current main.

@2SinceJuly

Copy link
Copy Markdown
Contributor Author

Confirmed — origin/main:knip.json:18 already lists scripts/verify-real-ghidra-function-bundle.mjs, and the script itself is tracked on main. There is no separate Knip failure on current main, so this PR is superseded by #9332. Closing.

@2SinceJuly 2SinceJuly closed this Nov 9, 2026
@morluto morluto added area: build Build, CI, packaging, and publishing bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build, CI, packaging, and publishing bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] main static gate rejects standalone Ghidra function-bundle verifier

4 participants