Skip to content

Add inactive risk-gates evaluator - #210

Merged
yihanzhu merged 10 commits into
mainfrom
codex/control-risk-gates-v1
Sep 1, 2026
Merged

Add inactive risk-gates evaluator#210
yihanzhu merged 10 commits into
mainfrom
codex/control-risk-gates-v1

Conversation

@yihanzhu

@yihanzhu yihanzhu commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Roadmap item 2: Control foundation.

Exact candidate

  • head: 007eb84
  • base: 1265034
  • branch: codex/control-risk-gates-v1
  • effect: inactive, repo-only, observation-only

Scope: eight paths

  • README.md
  • RESTORE.md
  • ci/required-files.txt
  • control/v1/evaluate-risk-gates.sh
  • control/v1/risk-gates-decision.json
  • control/v1/risk-gates-policy.json
  • control/v1/risk-gates.jq
  • scripts/test/control-risk-gates.test.sh

Proof on the exact head

  • Optimized risk-gates matrix: 48/48 in 85.89 seconds on the local exact candidate, under a 240-second outer hard timeout.
  • Representative routine, high, bootstrap, reject, duty, dependency, TOCTOU, path, and interpreter cases run the complete wrapper. Classification-only malformed, tier, stale, ambiguity, and precedence cases run the same pure jq evaluator with exact canonical reason and minimum-tier assertions.
  • Every evaluator and pure-evaluator invocation uses a bounded independent process group. TERM then KILL cleanup is shared by per-run timeout, ALRM, signal, and EXIT paths. A forced timeout with a TERM-resistant nested child proves the full group is reaped and scratch is removed; final proof finds no active group or scratch.
  • The TOCTOU marker poll is bounded inside the existing 45-second evaluator deadline with Linux startup margin; it does not extend the 240-second outer bound.
  • The strict empty-stdin jq regression proves the shipped decision identity check uses explicit null input on Linux and macOS.
  • Portable-core schema activation guard: 39/39, with all 47 owned rules, 141 direct cases, 13 route probes, 8 registry cases, and 8 numeric boundary cases passing; zero failures.
  • ShellCheck 0.11.0, Bash syntax, canonical JSON, diff, append-only manifest, required-file structure, and exact-path checks passed.

Linux root fix

  • The shipped decision identity check previously omitted jq null-input mode. The macOS jq 1.6 asset evaluates once on empty stdin, while the Linux jq 1.6 asset returns no output. Adding explicit -n makes the exact identity comparison platform-independent without weakening it.

Behavior

  • The evaluator binds the policy set, public core stage tuple, duty-separation result, policy, decision, and evaluator identities.
  • Caller-supplied accept decisions are immutable identity claims only. Without qualified decision provenance they are inconclusive and cannot satisfy the gate.
  • Malformed, stale, ambiguous, rejected, downgraded, conflicting, and unsupported claims are violated.
  • The result grants no approval, authority, qualification, permission, activation, or external effect.

This change does not use a real target or credential, execute candidate code, access a networked adapter, install or activate a profile, publish, release, deploy, or perform an external write.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploying ystack with  Cloudflare Pages  Cloudflare Pages

Latest commit: 007eb84
Status: ✅  Deploy successful!
Preview URL: https://e2f4164f.fabrica-6yx.pages.dev
Branch Preview URL: https://codex-control-risk-gates-v1.fabrica-6yx.pages.dev

View logs

yihanzhu commented Sep 1, 2026

Copy link
Copy Markdown
Owner Author

Codex reviewer (cross-vendor, read-only)

Reviewed-head: 007eb84
Reviewed-base: 1265034
reviewer: review_risk_210_final @ high

Bugs

No findings.

The complete classifier, malformed-input precedence, forced-high and unsupported-tier handling, claim/request/reference binding, timestamp ordering, duty-result regeneration, and canonical output validation were reviewed. Classification-only cases execute the exact shipped risk-gates.jq. Representative routine, high, bootstrap, reject, duty-violation, forged-duty, dependency, strict-jq, and TOCTOU cases retain the complete wrapper path. Pure cases retain canonical verdict, sorted and unique reasons, normalized minimum tier, and no-authority assertions.

Process-group launch waits for confirmed group ownership. Timeout and signal paths use bounded TERM, KILL, and wait cleanup. The forced-timeout regression proves that a TERM-resistant nested process does not survive. The TOCTOU marker pauses inside the exact risk-program execution window, and the final live-file identity check rejects mutation on Linux and macOS. An independent exact-candidate targeted run passed all 48 risk-gates checks.

Security

No findings.

Caller-authored accept claims remain inconclusive with unqualified provenance. No input can synthesize satisfied, authority, qualification, activation, permission, or an external effect. Malformed, stale, ambiguous, unbound, rejected, downgraded, unsupported, and duty-violating inputs fail closed. Policy, decision, evaluator, duty-separation, validator, and selected-core closure identities are bound and checked again after execution.

Inputs reject symlinks. jq must be an absolute regular jq 1.6 executable. Private mirrored dependencies execute, and race mutations are detected. The change adds no credential, real target, networked adapter, candidate execution, publish, deploy, release, install, or live activation path.

Compliance

No findings.

The exact diff contains only README.md, RESTORE.md, ci/required-files.txt, the five risk-gates product files, and the targeted risk-gates test. It is one inactive, repo-only Control foundation Roadmap concern. No construction-mode forbidden path or prefix is touched. Restore-manifest changes are append-only and include every new restore-critical file. README and RESTORE describe the inactive observation-only boundary and focused proof.

The branch is a linear descendant of the exact base. Required app-15368 CI run 33508343002 and check 99857694481 succeeded on this exact head/base. No exceptional implementation, authority expansion, workflow or permission change, constitution change, frozen PR #183 change, or excluded parent-plan change was found.

@yihanzhu
yihanzhu merged commit a6ebfe1 into main Sep 1, 2026
2 checks passed
@yihanzhu
yihanzhu deleted the codex/control-risk-gates-v1 branch September 1, 2026 13:30

yihanzhu commented Sep 1, 2026

Copy link
Copy Markdown
Owner Author

Construction merge receipt

  • PR: Add inactive risk-gates evaluator #210
  • result: merged by the authorized construction publisher
  • exact reviewed head: 007eb84905b5e3f3853fadf44ac5831006dd4b24
  • exact reviewed base / squash parent: 1265034c7f1851dff5f6f56b03b5df197e9ff2b3
  • merge / current main: a6ebfe11a9a417148c7406fc6d06d821bea3aa32
  • reviewed and merged tree: 0b85e8f02fb7cd104d0ac4d65cbd131daa86fbc4
  • required CI check: 99857694481 (app 15368, success)
  • independent review comment: 5494701731
  • publisher receipt SHA-256: 0fb4a2e0a26561bf7fd8b2250cfe76b793c39919d3c074d4ef9acb062d45975a

Postflight verified squash-only ancestry, exact tree equality, and the main ref.

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