ReviewOS

reviewos/reviewos.org

Release environment-scoped values after protection passes without inventing manual approval

#12
Closed chris opened this 3 days ago ·
3 days ago

The HQ sandbox checkout jobs expose an engine mismatch between environment policy and value delivery. https://reviewos.org/stacks/hq.training/run/2142 is a trusted main-branch run using a configured main-only environment with no reviewer requirement. Its jobs are correctly eligible without a human approval, so approved_at is null. ClaimJobAction nevertheless passes only Boolean(jobRow.approved_at) to environment-scoped secret selection, which withholds every scoped value.

Use the actual, freshly evaluated environment gate when deciding whether values may be delivered. Keep the manual-review timestamp as a separate fact; do not invent an approval or move sandbox secrets to repository scope. Branch, timer, required-check and reviewer protections must still fail closed, including policy changes after a job was queued. Retain the original ready/start timestamp when claiming a timer-gated job, so reevaluation does not restart its wait.

Add real HTTP claim regressions with disposable database fixtures for a main-only environment without reviewers, elapsed waits and policy changes after enqueue. Preserve existing untrusted-run and human-approval coverage. Configuration read failures must not be interpreted as an unprotected environment.

Related: https://github.com/stacksjs/hq.training/issues/376 and https://github.com/stacksjs/hq.training/issues/346.

3 days ago

Implemented and pushed to main as the configured Chris identity, with full issue URLs and no attribution trailers:

The claim path now reuses the actual environment protection decision before issuing any job API credential. It preserves the original ready/start timestamp, keeps manual-review history separate, and fails closed for missing run context and configuration/database errors. No environment credential was moved to repository scope and no approval was fabricated.

Three real HTTP regressions first failed on the prior source. With the fix, 137 relevant HTTP/database/unit tests pass with 627 assertions against a uniquely named disposable PostgreSQL 17.10 database with the normal 335 migrations. Full types and Pickier lint (3,571 files, zero warnings) pass.

The first complete CI ran 6,899 passing PostgreSQL tests and 6,885 passing MySQL tests. Its only failure in each engine was the roadmap completion count I missed; that count is corrected and its existing invariant passes locally. The normal replacement full CI/deploy is https://github.com/ReviewOS/reviewos.org/actions/runs/41008972296. Deployment and actual protected scope delivery still need verification before closing this issue. Actual HQ checkout jobs remain queued behind the Mac's unchanged disk admission floor.

3 days ago

The fix is deployed and verified through the normal pipeline.

Source: https://github.com/ReviewOS/reviewos.org/commit/1050770e97b3fc08e085935170ec1365c2570dfe and https://github.com/ReviewOS/reviewos.org/commit/26d2375ac076bf14b81e7309b0354b34ec0e2138 CI/deployment: https://github.com/ReviewOS/reviewos.org/actions/runs/41008972296, SUCCESS.

Final full suites: PostgreSQL 6,900 passed / 2 skipped / zero failures; MySQL 6,886 passed / 16 skipped / zero failures, each across 537 files. Lint, types, runner compilation and microVM checks pass. The pre-migration production backup completed normally and the release activated.

Read-only production proof independently checked that the active reviewos-api@26d2375.service process runs from the exact new release. Actual HQ checkout jobs 6220 and 6221 in https://reviewos.org/stacks/hq.training/run/2142 each have an actual protection verdict of run, no fabricated human approval, and exactly the three requested environment-scoped sandbox names. Both keys were checked for test-mode prefixes and the account for the existing owned synthetic merchant, in memory. No credential values were printed. Both job states remained queued and no runner job credential was issued by this read-only check. The temporary helper was removed.

The normal HTTP claim regressions cover actual value delivery; the production readback confirms the real encrypted scope and policy on the deployed source. Native payment/UI acceptance remains open in /stacks/hq.training/issues/376 because the Mac still has about 12 GiB free against its unchanged 24 GiB floor. This controller defect is complete; it is not a native checkout pass.

Sign in to comment on this issue.