Skip to content

check_issue_index is called only from main() and nothing proves the CLI runs it: deleting the call site leaves the suite at 113 OK and the command accepts the #1619 corruption #1750

Description

@localai-bot

scripts/check-agent-record.py:2125 is the only production call of check_issue_index, unguarded inside main(). Nothing proves the command-line entry point runs it, so the whole issue-index gate can be disconnected while every gate in the tree stays green.

Mutation, on row/GATE-ISSUE-INDEX-OWNER-KEY at f366a3ac6

-        check_issue_index(errors)
+        pass  # MUTATION: sole production call site of check_issue_index deleted

scripts/check-agent-record.py sha256 7abe4aa4b3a8b0d776364207396be146e58dd9d34067b9f258c106a96e12d593 pristine, e98c80ad74bd114d3a68f32f05e17487ed7f788bb6ccf4483058ef238038f874 mutated. The mutant was import-checked (IMPORT OK) before the run, because a mutant that fails to BUILD reads as a passing test.

run pristine mutated
python3 tests/scripts/test_agent_record.py 113 tests, OK 113 tests, OK
python3 scripts/check-agent-record.py, with the last index row appended a second time (the #1619 byte-identical shape) rc 1, issue #1731 is listed twice under the same owner ... rc 0, agent record OK: ENGINE=170 MODEL=377 ...

So the command accepts the exact corruption the function exists to refuse, and the gate suite does not move a single case. test_the_tracked_index_is_valid proves the FUNCTION reads the real file. Nothing proves the COMMAND calls the function.

Restored byte-for-byte: checker back to 7abe4aa4..., index back to 4e80b8ba32333ac2589c9b616719f95eece6dd8a53e978e89bb09e8838fe9fbe, git status --porcelain empty.

Inherited, not introduced by #1744

git log -S'check_issue_index(errors)' -- scripts/check-agent-record.py returns one commit, 51e0cb5b1, which created the call site when the index moved out of the roadmap. #1744's diff to that file touches only the body of check_issue_index, never main().

The repair pattern is already in the same test class

tests/scripts/test_agent_record.py:1661-1683 does exactly this for check_table_shapes: it patches the callee, drives agent_record.main([]), and asserts on the paths the REAL call received. That test exists because #1033 measured the same exposure on that call — check_table_shapes never ran on .agents/issue-index.md, and two malformed rows mis-rendered on GitHub with every gate green. Its docstring states why capturing the call beats grepping the source: "A test that greps check-agent-record.py for the string issue-index passes on a line that is commented out, on a second call site that is never reached, and on a constant that is defined and never used."

The same shape applies here, and it should cover the other unguarded calls in that if not errors: block rather than check_issue_index alone.

Found by the fresh review of #1744 and reproduced independently before filing. Not repaired in that flow: it is pre-existing, it is a gate-suite semantic that owes its own red-before evidence, and folding it in would hide a checker change under a records repair. Owned as debt under ## Owed in .agents/specs/gate-issue-index-owner-key.md.

Refs #1745, #1033, #1619.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions