Skip to content

Fix false completion, escaping checks and filename/line-count handling - #2

Merged
Solarthis merged 1 commit into
mainfrom
maintenance/verifier-evidence-20261006
Nov 10, 2026
Merged

Solarthis merged 1 commit into
mainfrom
maintenance/verifier-evidence-20261006

Conversation

@Solarthis

Copy link
Copy Markdown
Owner

Improvements

  1. Unchecked checklist items cannot pass when no verification command ran.
  2. File checks reject lexical/realpath escapes and require regular files.
  3. Git diff/status parsing is NUL-delimited; unusual filenames remain exact, and rename source/destination both reach guards.
  4. Untracked symlinks are not followed for content counting.
  5. Final newlines no longer add phantom lines to untracked change totals.

Verification

Four new regressions failed against original source. Full npm test now passes19 tests, including six new verifier cases; TypeScript build and diff check pass. All integrations use MockCodexClient / mock mode. CODEX_BIN was set to a nonexistent path as an extra guard: no Codex CLI, model inference, user computer or paid provider was used.

No new dependencies or sandbox/approval weakening. Real Codex integration, Windows process semantics and adversarial concurrent filesystem replacement remain unverified. Path checking is defense in depth, not a replacement for OS confinement. Draft only.

@Solarthis
Solarthis marked this pull request as ready for review November 10, 2026 10:57

Copy link
Copy Markdown
Owner Author

Review: ready to merge (merge main into the branch first)

What it does: Stops the verifier from marking work done without evidence. A checklist item gated on verification no longer passes when no verification command ran. fileExists and fileContains checks are confined to the project (lexical path and realpath) and must point at a regular file. Git change capture is NUL-delimited, with renames split into delete + add, so odd filenames and both sides of a rename reach the guards. Untracked symlinks are not followed when counting lines, and a trailing newline no longer adds a phantom line.

What I changed: Nothing pushed. A trial merge of main (4 commits, including PR #3/#4 changes to src/verifier.ts and README.md) auto-merges with no conflicts.

Tests: On the PR head, rm -rf dist && npm test passed 19/19. On the trial merge with main, npm test passed 29/29. CODEX_BIN was set to a nonexistent path for both, and all integrations are mocked. An earlier run showed 9 failures that came from stale dist/ files left by the merge build, not from the code. A clean build passes.

Review:

  • Behaviour change: fileExists now fails for a directory. Previously it passed. Check whether any checklist uses fileExists on a folder.
  • git status --no-renames -z and diff --no-renames --numstat -z are parsed correctly.
  • Nit: src/verifier.ts ends with an extra blank line, so git diff --check flags it. The PR description says the diff check passes.
  • Security: real improvement. Checklist checks could previously read outside the project through ../ or symlinks.

Deploy impact: None. CI on main only runs npm test.


Generated by Claude Code

@Solarthis
Solarthis merged commit e5e3dc8 into main Nov 10, 2026
1 check passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 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-10T10:58:18.802537Z a49ec0e Draft marked ready
ℹ️ 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.

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