wishforge-ide/docs/verification-profiles.md
eust-w b47a07e8d2 chore: baseline snapshot of the Codex-delivered code before review
Imports the previously untracked working tree as-is so that the review
changes that follow (requirements -> design -> implementation) can be
reviewed as diffs and reverted if needed. No content changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 13:18:04 +08:00

2.8 KiB

Independent acceptance profiles

Repository test commands are supplemental evidence: a Builder can edit the files and package scripts behind npm test. Production verification therefore requires an independently installed acceptance profile, in addition to project checks.

The operator builds profile scripts into the verifier image below /usr/local/lib/wishforge-verification/, owned by root and not writable by the runtime user. The verifier image root is read-only; bubblewrap exposes /usr read-only and neither provider credentials nor worker tokens. Profiles must use absolute executable paths and pinned script digests. Include all custom helper files in the profile manifest; interpreter/runtime dependencies belong to the pinned verifier image. A profile is trusted platform code: it must not import repository-controlled assertion helpers or scoring rules into its own process. For Web acceptance, launch the app as a separate child process inside the isolated check, then assert HTTP/browser behavior and persisted results from trusted code.

The API operator configures WF_VERIFICATION_PROFILES_JSON as an array:

[{
  "id": "catalog-web",
  "version": "2026-10-17.1",
  "commands": [["/usr/local/bin/node", "/usr/local/lib/wishforge-verification/catalog/accept.mjs"]],
  "files": [{"path": "/usr/local/lib/wishforge-verification/catalog/accept.mjs", "sha256": "<actual 64-character SHA-256>"}]
}]

GET /v1/verification-profiles lists installed IDs and versions. A human Owner or Admin selects one with POST /v1/projects/:id/verification-profile and {"profileId":"catalog-web"}. The request cannot upload scripts, alter commands, or grant filesystem permissions. The full resolved manifest is stored with the project, included in execution context, and bound to evidence/release policy.

The verifier checks file origin, type, ownership, size and digest before executing any checks. Independent profile commands are mandatory even if every repository test reports success. Evidence includes the profile digest. Changing either the operator manifest or selected profile invalidates prior verification/build and approval; a fresh verification is required. Removing the selected profile disables further publication. Production with no profile waits/refuses verification; there is no repository-test fallback. Development can explicitly run without a profile, but that result does not establish protected production acceptance.

The unit suite checks missing-profile refusal, mandatory command coverage, digest binding, build/approval invalidation and unsafe paths. No actual Linux profile, customer business acceptance suite, or production verifier image was executed in this local macOS run. Each project still needs its real acceptance assertions; passing an empty or superficial operator script is not business acceptance.