Skip to content

docs: publish this project's exit-code contract, and flag the family collision - #60

Merged
webdevsamran merged 1 commit into
mainfrom
docs/exit-code-contract
Sep 9, 2026
Merged

docs: publish this project's exit-code contract, and flag the family collision#60
webdevsamran merged 1 commit into
mainfrom
docs/exit-code-contract

Conversation

@webdevsamran

Copy link
Copy Markdown
Owner

These four sibling projects each call their exit codes a public contract — CI gates and onboarding scripts branch on them — and none documented the full set in one place.

Stage C of the plan says to flag the cross-project collision rather than fix it by extracting a shared library. A shared library would couple four independent release cycles, and one of these projects deliberately ships with no dependencies at all.

docs/exit-codes.md now states this project's own codes, and test_exit_codes_documented.py fails if the document and the code disagree in either direction. A documented contract that is wrong is worse than an undocumented one, because wrappers get written from the document.

Verifying the collision changed two things about the plan's description

The plan said "only 0 agrees". Right in substance — 0 means success in all four, though devrepro-doctor names it READY rather than OK.

It also said devrepro-doctor is "the inverse of AVL/LAHB on 2/3/4". It is not an inversion. api-verity-lab has usage=2, internal=4; devrepro-doctor has usage=4, internal=3. The meanings rotate rather than swap — and calling it an inverse would have put a wrong statement into a document about correctness.

The genuinely dangerous collision is code 1

Project Exit 1 means A gate should
api-verity-lab findings detected fail
devrepro-doctor READY_WITH_WARNINGS pass
tooltrace-bench error fail
local-ai-hardware-bench validation error fail

A wrapper that treats any non-zero status as failure blocks on a DevRepro run that reported the machine as usable.

The second is code 2: an operator mistake in two of them, and devrepro-doctor's most important verdict — the machine cannot build this project — in the third.

Verification

ruff · ruff format --check · mypy · full suite green · every link in the new document resolves · drift test verified by renaming a documented code and watching it fail.

…collision

These four sibling projects each call their exit codes a public contract -- CI
gates and onboarding scripts branch on them -- and none documented the full set
in one place. Stage C of the plan says to *flag* the cross-project collision
rather than fix it by extracting a shared library, because that would couple
four independent release cycles and one of these projects deliberately ships
with no dependencies at all.

docs/exit-codes.md now states this project's own codes, and
test_exit_codes_documented.py fails if the document and the code disagree in
either direction. A documented contract that is wrong is worse than an
undocumented one, because wrappers get written from the document.

Verifying the collision rather than repeating the plan's description of it
changed two things about that description.

The plan said "only 0 agrees". Right in substance: 0 means success in all four,
though devrepro-doctor names it READY rather than OK.

It also said devrepro-doctor is "the inverse of AVL/LAHB on 2/3/4". It is not
an inversion. api-verity-lab has usage=2 and internal=4; devrepro-doctor has
usage=4 and internal=3. The meanings rotate rather than swap, and calling it an
inverse would have put a wrong statement into a document about correctness.

The genuinely dangerous collision is code 1:

    api-verity-lab           1 = findings detected      (a gate should fail)
    devrepro-doctor          1 = READY_WITH_WARNINGS    (a gate should pass)
    tooltrace-bench          1 = error
    local-ai-hardware-bench  1 = validation error

A wrapper that treats any non-zero status as failure blocks on a DevRepro run
that reported the machine as usable. The second is code 2: an operator mistake
in two of them, and devrepro-doctor's most important verdict -- the machine
cannot build this project -- in the third.

Verified: ruff, ruff format, mypy, full suite green, every link in the new
document resolves.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@webdevsamran
webdevsamran merged commit 4b5272d into main Sep 9, 2026
12 checks passed
@webdevsamran
webdevsamran deleted the docs/exit-code-contract branch September 9, 2026 11:28
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