KB-6A51

Codex Review - R1a/R2a Runner/Cron/Log Root-Cause Study

12 min read Revision 1
codexreviewr1ar2arunnercronlogroot-causeread-only2026-06-18

Codex Review - R1a/R2a Runner/Cron/Log Root-Cause Study

Date: 2026-06-18
Reviewer: Codex
Class: independent adversarial control review / read-only / non-authorizing
Official KB path: knowledge/dev/laws-new/reports/codex/codex-review-r1a-r2a-runner-cron-log-root-cause-2026-06-18.md

STATUS: PASS_WITH_CAVEATS

Step 0-6 Evidence

  • Read .claude/skills/incomex-rules.md and AGENTS.md; no background agent used.
  • search_knowledge("operating rules SSOT") read OR v7.58 evidence.
  • search_knowledge("hiến pháp v4.0 constitution") returned current Constitution v4.6.3; no v3.9 citation.
  • Related law/report evidence read through AgentData: Dieu 39 KG law/note, birth/certify reports, R1a/R2a reports.
  • Full AgentData reads performed for R1a, R2a, and combined execution report.
  • This report is the only authorized KB write for storage; no runtime/DB/DOT/source mutation.

3 Cau Tuyen Ngon

  1. Vinh vien? Root-cause baseline is accepted only as decision evidence; fixes remain Owner-gated because they require new governed build/design.
  2. Nhầm được không? The reports preserve hard barriers: READ ONLY SQL, no restarts, no jobs, no gate flips, no owner assignment, no contract promotion.
  3. 100% tu dong? Not for remediation. Current result identifies why automation is absent/blocked; remediation must not start until Owner decision packet authorizes it.

Executive Summary

  • R1a root cause is supported: KG runner exists and is endpoint-bound for the EXPLAIN pilot, but real-run is deliberately fail-closed behind five gates and 35/36 KG DOTs, including provenance DOTs, are unrouted.
  • R2a root cause is supported: 2026-03-21 certification was a manual one-shot S157-A bootstrap; no standing inspection producer/runner exists; birth VERIFY/GATE DOTs are unwired stubs.
  • Review status is PASS_WITH_CAVEATS, not clean PASS, because executor logs were denied, R2a used a synced local mirror for producer scripts, old logs/env/transient GUCs remain unreadable, and the combined report body has a minor metadata typo.
  • These caveats do not invalidate the root-cause baseline, but they must constrain wording: no claim of direct executor process-log proof, no claim of direct live /opt/incomex/dot/bin read, and no claim that transient bypass GUCs certainly do not exist.
  • Write-enabled remediation, technical design, blocker resolution, and implementation remain unauthorized.
  • Recommended next macro: Owner Decision Packet for R1a/R2a before any write-enabled work.

Files / Metadata Audit

File Expected Observed Verdict Issue
knowledge/dev/laws-new/newlaws/reports/r1a-kg-runner-log-provenance-source-root-cause-2026-06-18.md rev1 / 27168 rev1 / 27168 PASS None
knowledge/dev/laws-new/newlaws/reports/r2a-birth-inspection-runner-cron-log-root-cause-2026-06-18.md rev1 / 23425 rev1 / 23425 PASS None
knowledge/dev/laws-new/newlaws/reports/r1a-r2a-runner-cron-log-root-cause-execution-report-2026-06-18.md rev2 / 14798 rev2 / 14798 PASS_WITH_CAVEAT Body still says Revision rev1 and file table says content_length 14799. AgentData metadata rev2/14798 wins; this is a non-material metadata typo after patch.

R1A Audit

Check Verdict Issue
Runner present and bound PASS_WITH_CAVEAT incomex-agent-api-executor is listed healthy and DOT_KG_EXPLAIN contract binds :8090/dispatch; process logs are DENIED, so no direct executor log proof.
Fail-closed NO_GO supported PASS v_dotkg_realrun_preflight=REALRUN_BLOCKED_MULTI_GATE; DB-side preflight and contract tables are sufficient for gate state.
Five gates supported PASS real_run_enabled=false, execute_enabled=false, dry_run_only=true, dotkg_owner_present=0, contract mode DRY_RUN.
“Not missing/broken runner” justified PASS_WITH_CAVEAT Justified for endpoint/contract/preflight substrate; not proven from process logs. Wording must remain “not missing/broken at DB-contract layer.”
1/36 KG DOTs contracted PASS Only EXPLAIN pilot has agent-api contract; provenance TAG/AUDIT are unrouted.
No provenance source-of-truth PASS_WITH_CAVEAT Supported for current substrate: edges are `LEGACY
Qdrant/entity_embeddings PASS Correctly treated as vector/search, not KG edge provenance SoT.
Non-authorization PASS No gate flips, owner assignment, contract promotion, KG execution, backfill, or quarantine authorized.

R2A Audit

Check Verdict Issue
Manual one-shot bootstrap supported PASS_WITH_CAVEAT Supported by dot_origin buckets plus script content; old 2026-03-21 container logs are unavailable.
“Nothing to restart; producer to build” justified PASS No standing runner, no pg_cron, no birth host cron, inspector DOTs unwired; this is net-new governed build/design, not restart.
Old logs gap handled PASS_WITH_CAVEAT Lack of old logs is an evidence gap, but provenance rows plus scripts are strong enough for baseline.
Local synced mirror scripts acceptable PASS_WITH_CAVEAT Acceptable as corroborative because DB dot_origin and script behavior match; not direct proof that live /opt/incomex/dot/bin currently matches byte-for-byte. No overclaim if described as synced mirror evidence.
dot_origin and script corroboration PASS backfill:s157b, backfill:dot-birth-backfill, `SYSTEM-s157b
Cron wiring PASS no pg_cron; host 0 6 * * * is dot-nrm-lifecycle, not birth verify.
GUC persisted layer PASS_WITH_CAVEAT pg_settings app.%=0, pg_db_role_setting=0 prove no persisted bypass/default; transient session layer remains unreadable. Must not claim bypass certainly does not exist.
Non-authorization PASS No restart, inspect writes, certified writes, stamp materialization, or runner build authorized.

Command / Read-Only Audit

Check Verdict Issue
SQL SELECT/catalog only PASS Combined ledger Q1-Q24 are SELECT/catalog reads.
Read-only DB posture PASS Reports state query_pg READ ONLY transaction and read-only role.
Docker access read-only PASS list_docker and tail-only docker_logs; denied executor log is read-denial only.
Local file access read-only PASS local ls/find/wc/Read only.
No DB write / DDL / DML PASS No write commands in ledger.
No restart/reload PASS None performed.
No runner/job execution PASS None performed.
No DOT/KG/birth/certify/promote execution PASS None performed.
No backfill/quarantine PASS None performed.
No inspect/certified writes PASS None performed.

Findings Severity Audit

Finding Report severity Codex severity Verdict Notes
R1a-F1 HIGH HIGH PASS 5 BLOCK gates are direct DB/preflight evidence.
R1a-F2 HIGH HIGH PASS Contract coverage gap is material: 1/36 only.
R1a-F3 HIGH HIGH PASS_WITH_CAVEAT High for inspected substrate; source recovery may later identify provenance inputs.
R1a-F4 MEDIUM MEDIUM PASS Runtime/queue disabled supports severity.
R1a-F5 LOW/asset LOW/asset PASS Healthy endpoint is asset, not readiness pass.
R1a-F6 INFO INFO PASS Downstream consequence; no pg_cron.
R1a-G1 INFO gap INFO gap PASS Executor logs denied; does not overturn DB-side conclusion.
R2a-F1 HIGH HIGH PASS No standing producer/runner is central blocker.
R2a-F2 HIGH HIGH PASS_WITH_CAVEAT Manual bootstrap supported indirectly, not by old logs.
R2a-F3 HIGH HIGH PASS Cron not wired is direct from pg_extension and crontab snapshot.
R2a-F4 HIGH HIGH PASS Backlog and starved consumer remain hard blocker.
R2a-F5 MED/INFO MED/INFO PASS_WITH_CAVEAT Persisted GUC absent; transient unreadable.
R2a-G1 INFO gap INFO gap PASS Local mirror / logs / env allowlist gap is correctly disclosed.

Evidence Gap Audit

Gap Impact Verdict
R1a executor logs DENIED Prevents direct process-log proof of dispatch/skip behavior. Not fatal; DB preflight, contract, observations, and config sufficiently prove fail-closed root cause.
R2a 2026-03-21 container logs unavailable Prevents log-level reconstruction of bootstrap. Not fatal; certified row provenance and script content corroborate one-shot manual bootstrap.
R2a producer scripts from synced local mirror Not direct live /opt/incomex/dot/bin read. Accept with caveat; enough for review because DB dot_origin/script behavior match, but no byte-for-byte live-file claim.
Env files and transient GUC unreadable Cannot prove transient session bypass never exists. Persisted layer is empty only; claim must be limited to “no persisted bypass/default.”
Combined report metadata typo Body says rev1/14799 while KB metadata says rev2/14798. Non-material; AgentData metadata wins.

Non-Authorization Audit

  • DB write/DDL/DML performed/authorized? no
  • container restart/reload performed/authorized? no
  • runner/job execution performed/authorized? no
  • KG/DOT/birth/certify/promote execution performed/authorized? no
  • backfill/quarantine performed/authorized? no
  • inspect/certified writes performed/authorized? no
  • gate flips / owner assignment / contract promotion authorized? no
  • source/prior-report patch performed/authorized? no
  • current corpus created/authorized? no
  • technical design authorized? no
  • implementation authorized? no
  • blocker resolved? no

Next-Step Decision

  • Are R1a/R2a accepted as root-cause baseline? yes, with caveats above.
  • Is write-enabled remediation authorized now? no.
  • Is technical design authorized now? no.
  • Recommended next macro: A - Owner Decision Packet for R1a/R2a.
  • Why: the root causes imply governed net-new work, not simple restart: R1 needs Owner decisions on five gate clears, owner assignment, contract coverage, and provenance source recovery; R2 needs Owner decisions on standing producer/runner channel, backlog disposition, and GUC policy.

Final Recommendation

  • Further Claude patch needed? no, except optional metadata typo correction in combined body if Owner wants cosmetic consistency.
  • Owner can use these reports for decision? yes.
  • Default next action: prepare Owner Decision Packet for R1a/R2a; do not open write-enabled remediation or technical design automatically.
  • Do not implement confirmation: confirmed. No runtime mutation, DDL/DML, restart, job execution, DOT/KG/birth/certify/promote execution, backfill, quarantine, inspect/certified writes, gate flip, owner assignment, contract promotion, technical design, implementation, current corpus, draft adoption, or blocker resolution is authorized.
Back to Knowledge Hub knowledge/dev/laws-new/reports/codex/codex-review-r1a-r2a-runner-cron-log-root-cause-2026-06-18.md