Skip to content

fix(ce-compound): name search base in repo-scoped path flag - #1553

Open
Amanjyot-P wants to merge 1 commit into
EveryInc:mainfrom
Amanjyot-P:fix/1545-repo-scoped-path-flag-message-20260827110008
Open

fix(ce-compound): name search base in repo-scoped path flag#1553
Amanjyot-P wants to merge 1 commit into
EveryInc:mainfrom
Amanjyot-P:fix/1545-repo-scoped-path-flag-message-20260827110008

Conversation

@Amanjyot-P

Copy link
Copy Markdown

Fixes the misleading repo-scoped path validation message from #1545.

Summary

validate-doc-claims.py resolves cited paths against a single repo root. When a citation is unresolvable, the FLAG message said only "not found in working tree" (or "... or origin/main"), with no mention of which repo it searched. That reads as a global "this citation is wrong," which an agent can't distinguish from "this citation points somewhere I didn't look" (e.g. a second solutions store in another repo on the same machine).

Fix

The FLAG message for the "not found anywhere" case now names the search base and states the check is repo-scoped:

FLAG path `x.md` (line N) — not found in working tree, under /path/to/repo.
This check only looks in this repository; check other stores before
treating the citation as wrong. Otherwise, fix the citation, or annotate
it as historical (e.g. removed by this fix).

Applied identically to both copies of the script (skills/ce-compound/scripts/validate-doc-claims.py and skills/ce-compound-refresh/scripts/validate-doc-claims.py), which AGENTS.md requires to stay byte-identical. Confirmed with diff after the edit.

The other two flag branches (tracked-at-HEAD, exists-upstream) already name their source (working tree, origin/main etc.) and are unchanged.

Tests

Updated tests/doc-claims-validator.test.ts assertions for the three "not found" scenarios to check the new wording (repo base path included). Added realpathSync on the scratch repo path so the assertion matches the script's own git rev-parse --show-toplevel output on macOS (/tmp vs /private/tmp symlink).

bun test tests/doc-claims-validator.test.ts
 53 pass
 0 fail

Also ran the full bun run test suite. It has pre-existing unrelated failures (timing-sensitive ce-babysit-pr-snapshot watcher tests and ce-code-review-cross-model-routes peer-idle heuristics) reproducible on a clean main checkout without this change — confirmed via git stash on the same worktree.

Security Disclosure

No security-relevant changes.

Agent Disclosure

  • Model: Claude Code

validate-doc-claims.py resolves cited paths against a single repo
root, but the FLAG message for an unresolved path said only "not
found in working tree" — indistinguishable from "this path is wrong"
even when the citation is valid in another store on the same machine.

Name the search base in the message and state that the check is
repo-scoped, so the agent adjudicating the flag knows to check other
stores before treating the citation as wrong.

Relates to EveryInc#1545

@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: dded5bbf1d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +280 to +281
f"{base}. This check only looks in this repository; check "
"other stores before treating the citation as wrong. "

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 Avoid calling the CWD a repository outside Git

When the document is outside a Git repository, in_git is false and base is the process CWD, yet this branch now says the check only inspected “this repository.” Running the validator from this checkout against a /tmp/doc.md containing missing/file.md reproduces a contradictory report: it first says the document is not in a Git repository, then names this checkout and calls it the repository searched. Make the repository-scoped wording conditional on in_git; otherwise describe the base as the current working directory (or skip repo-path classification as the preceding INFO claims).

Useful? React with 👍 / 👎.

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