What your Git host must enforce¶
archvow is deterministic: the same code and the same spec give the same result, for every person and every AI. But archvow is a program that runs on a developer's machine and in the CI. It can say what is wrong; it cannot stop someone who skips it, and it cannot know who someone is. What makes its result binding is your Git host (GitLab, GitHub, a Jenkins-driven server): who may merge, which checks must pass, who must approve.
This page lists, for each thing archvow checks, the setting it relies on. A security review of a project can start here.
What archvow knows and what it cannot know¶
- It reads files. The vow (
.archvow/), the code, the tests, the CI files, the test report. Everything it checks is in the repository or in a file the CI gives it. - Names in files are declared, not proven.
@authorand@assistedin a file header, the@reviewerof a review report, the AI tool a commit came from: whoever writes the file writes them. archvow checks they are present and allowed (ARCH018, ARCH040-042); it cannot check they are true. - Approval is the Git host's. archvow writes the code owners file and fails a merge request that weakens a guard (ARCH020); a person accepting that change is an approval on the merge request, done in the Git host.
- It does not run the code. The checks read Python's syntax tree: aliases are followed
(
from time import sleep as nap), calls throughgetattr,importlibor a function passed as a value are not seen. What the code does is shown by tests, and archvow checks they exist, can fail (ARCH045) and passed in the CI (ARCH046).
Each guarantee and the setting it needs¶
| archvow checks | It holds only if |
|---|---|
the code follows the spec (archvow check) |
the CI runs it on every merge request and a failing pipeline blocks the merge ("Pipelines must succeed" on GitLab, required status checks on GitHub, the Jenkins result reported to the server) |
| the Git hook runs the same checks before each commit | nothing - it is a convenience. git commit --no-verify skips it; the CI is the check that counts |
| a guard weakened in a merge request fails (ARCH020) | the CI compares with the target branch (check --base), and the label or variable that accepts it (architecture-approved, ARCHITECTURE_APPROVED) can be set only by architects - on GitLab CE any Developer can set a label: restrict who merges instead |
| spec changes are approved by the architects | main and develop are protected (no direct push), and code owner approval is required: GitLab Premium or Ultimate ("Code owner approval"); GitHub branch rules or rulesets ("Require review from Code Owners"). GitLab CE does not enforce code owners: there, only Maintainers may merge, and the architects are the Maintainers |
| separation of duties (DORA002) | the author cannot approve their own change: GitHub never allows it; on GitLab switch on Prevent approvals by users who add commits |
| an unapproved AI tool's files fail the check (ARCH040) | the CI check above. Using an unapproved tool without its files is company policy (IDE allow-lists, network rules) |
| an AI agent outside a sandbox or in YOLO mode is stopped (ARCH051, ARCH052); a commit of an agent's code says how the agent ran (ARCH053) | the agent runs archvow (its instructions say so) and the CI runs check --base, which finds commits made without the hooks. How the agent was configured is the IT department's: managed settings - Agent security |
| invariant tests ran and passed (ARCH046) | the CI runs pytest and passes its report: archvow check --test-report test-results.xml (generated in every CI); the test job is not allowed to fail (DORA004 checks allow_failure / continue-on-error) |
| the CI files are not weakened | they are guard files: changed only through an approved merge request (CODEOWNERS lists them) |
| the CI result is trustworthy | the runners are the company's or the host's, and a merge request from a fork cannot change the pipeline that judges it (protected variables, approved runners) |
Settings, once per project¶
archvow init prints them for the platform you chose. In short:
- GitLab: protect
mainanddevelop(push: No one; merge: Maintainers); "Pipelines must succeed"; Premium/Ultimate: "Code owner approval" on the protected branches, Prevent approvals by users who add commits. - GitHub: a ruleset on
mainanddevelop: pull request required, review from Code Owners, the CI's status checks required, no bypass. - Jenkins with any Git server: protect the branches on the server, and make the Jenkins result a required check of the merge.
See also Project management and, to try the settings on a real server before a rollout, the enterprise lab in the wiki.