Repository navigation
policy: cross-check the loaded CMDB against host_specific.json; refuse to actuate on any difference (Q10) - #42
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…e to actuate on any difference (Q10, proposal 13 option 3)
71245b8 to
b0c48e7
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 37d04ccc-ca9b-4596-8bfd-a7ec03d2f6e7) |
…a sections and non-identifier keys, clear preset id lists on refusal (PR 42 review: Astra A1/A2, adversary L1-L3) F1: tendcf_cmdb compares storejson() of each vars container with the loaded one; an uncomputable comparison is a difference. F2: any top-level key other than vars is refused (the loader also applies variables and classes); the two daemon-reload commands carry !tendcf_cmdb_refused. F3: a vars key that is not [A-Za-z0-9_]+ is refused; interlock_ids and service_ids are set to empty lists under the refusal. F4: the common-bundle ordering wording now states the vars/classes pre-evaluation guarantee with the pinned source, and that this is not a sandbox. Tests: run.sh checks 9-10 (variables collision, classes section, scoped preset, same-id changed value via the stand-in loader). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 8b922561-c95c-47f4-a1e7-3a5f690c5b5a) |
…an uncomparable vars value is refused Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 84fbaa31-84ae-4a16-8add-453f02a7c86e) |
…ings round-trips equal); fix the wording Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: b8b8ab5b-9e8e-48ba-b847-91eae9fc1991) |
…presets, hidden classes section, augments) and count tendcf_cmdb evaluations Deliberately red against 56cf91f's policy: the new checks 9 cases expect a refusal the policy cannot give yet. Check 11 only observes how often the engine evaluates tendcf_cmdb. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: b85d2d93-0380-46bb-ba5f-45aa3014dc57) |
…ide data:variables.<identifier>, define problem classes positively from the current comparison, sanitise reported text; installer writes data by atomic rename PR 42 round 2 (Astra A1/A2, adversary M1/L1/L2/I1). Closes the preset of the checker's own variables and of the gates' id lists (a vars promise with a function-call rvalue is skipped when the variable exists), replaces the sticky tendcf_cmdb_json_equal_* negation with a differs class and an uncomparable class, and prints file-derived text only in a sanitised, capped form. Docs and header corrected to what the source supports. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 65423997-1062-4f51-a642-f646ddebaae3) |
…r acts on a replaced file; qualify the preset and evaluation docs to what CI measured; classes-hidden asserts the class and section Check 11 on d288c81 showed tendcf_cmdb's vars, readjson of doc included, are visited on every pass while its classes are decided once, so a later pass read a replaced file the decision never saw. doc is now skipped once it exists. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: ba2adda0-1ac4-449b-b65a-1bf2a7ca706e) |
…ints the policy's own report text, which the refusal grep matched), pins the single expected outcome and the one read of the file Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: abfea8bd-44cc-40d3-a95d-a0456d25a234) |
… read (refused, content differs) and after it (not refused, loaded pre_action runs), each with one outcome Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 14375043-4db7-42ae-b6d9-a7dd1446f7dc) |
…evaluation counts and the two probe timings; presets may survive or be replaced Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 15ca612f-4e2e-458d-aed0-6964e0d7b759) |
…t) and a 70-character key report case; both must fail on db1e73e's policy Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 0e93cbe9-2189-451d-ba89-6a3b16103272) |
…problem_noverdict classes, before tendcf_cmdb_refused); reports cap the key at 64 characters Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… (classes set once and never cleared, an unset class re-evaluated on the second resolution), why the bundles share one file, the no-verdict class; check-list header Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: da6e1553-2239-4acb-a26c-c11266553c37) |
Corrects the rulings record against the three reviews of PR 62: schema facts (v6 and contract_version const 2 are implemented by PR 52; later changes take the next unused version, grouping not ruled), stale merge/pending statuses (PR 52, #42, #41 merged; WarpBuild run succeeded), the spike lane's rails restored word for word with the workflow-permission hardening marked as hardening, the light review tier read conservatively (no waiver of routing or admission rules), the Linux design-work freeze removed (later in the order, not paused), option-number notes, and open items marked 'open: awaiting operator ruling' (Android log/index ownership, root enforcement timing, reviewer eligibility, schema grouping) with a new open-items list in 14. The rulings file is now committed beside 14 as rulings-record-2026-11-14.md and local paths are stripped from public docs. No new decisions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Corrects the rulings record against the three reviews of PR 62: schema facts (v6 and contract_version const 2 are implemented by PR 52; later changes take the next unused version, grouping not ruled), stale merge/pending statuses (PR 52, #42, #41 merged; WarpBuild run succeeded), the spike lane's rails restored word for word with the workflow-permission hardening marked as hardening, the light review tier read conservatively (no waiver of routing or admission rules), the Linux design-work freeze removed (later in the order, not paused), option-number notes, and open items marked 'open: awaiting operator ruling' (Android log/index ownership, root enforcement timing, reviewer eligibility, schema grouping) with a new open-items list in 14. The rulings file is now committed beside 14 as rulings-record-2026-11-14.md and local paths are stripped from public docs. No new decisions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Policy-side half of the interlock fail-open fix (djbclark's ruling Q10, 2026-11-02, option 3 of
docs/architecture/tendcf-validate-proposal-2026-11-03.md§13). The fork-side half (all-or-nothing loader) is #41; this works with or without it.Bug.
interlock_blocked_<bundle>exists only for an interlock entry that loaded, and services are gated on!interlock_blocked_*. When the loader skipstendcf_interlockand installstendcf_service, every service runs ungated.Design (
policy/tendcf_services.cf,bundle common tendcf_cmdb).It reads
$(sys.workdir)/data/host_specific.jsononce (readjson, 5 MiB cap, guarded bynot(isvariable("doc"))). Pervarskey, it compares the file with what the loader installed: the key identifiers, the entry ids, and the whole container'sstorejson()text.Every problem is a positive class, defined from the current comparison, before
tendcf_cmdb_refused:missing,unlisted,sections(any top-level key butvars) andbadkey(a non-identifier key);foreign_var/foreign_class: anysource=cmdborsource=augments_filevariable outsidedata:variables.<identifier>, and any such class. These are read from the loaded state with inlinevariablesmatching()/classmatch(), so there is no variable a CMDB author can preset;partial_<key>(different ids) anddiffers_<key>(different content);uncomparable_<key>(a side that cannot be serialised) andnoverdict_<key>(both texts exist, but the comparison gave neither "equal" nor "differs", e.g. text holding$().tendcf_cmdb_json_same_<key>is the only success class, and onlynoverdictreads it.Under refusal, both bundles' id lists are literal empty lists, so no pre_action, service, tombstone or daemon-reload is actuated.
tendcf_interlocksreports once what differs. File-derived text is printed sanitised (characters outside[A-Za-z0-9._:@/-]become?) and capped at 64 characters per name.It is a consistency check on one snapshot, not a sandbox. A file replaced before the read is compared and refused if it differs. A file replaced after the read is intentionally unseen, because what actuates is exactly the data that was checked.
Evaluation, measured on the pinned fork (check 11, debug run):
tendcf_cmdbwas resolved 2 times,doc1 time,file_json10 times,tendcf_cmdb_refused2 times, and the mutation ran 1 time. A class is set once and never cleared. A still-unset class is evaluated again on the second resolution, from the same snapshot.tendcf_cmdbshares one file with the gated bundles because of per-file resolution, and a split would still fail closed.Installer (
deploy/linux/tendcf-install.sh).put_datawrites a root-owned 0600 sibling and renames it into place, keeping the backup.Tests (
tests/policy/run.sh).classessection, augments, and scalar/numeric-list values. Controls: a list of strings is accepted and actuates; the normal empty cases are quiet. A 70-character key is refused, and its report shows at most 64 characters.tests/policy/sim-loader.cf): skips one container, a half-loaded container, an extra loaded variable, and data loaded with no file.tests/policy/probe-mutate.cf), a file replaced during the run:$(: refused as "reached no verdict", and nothing runs.systemctlruns.Reviews. Each round's fixes were reproduced in CI before they landed.
put_data.source=augments_file).noverdict).key_clean.json_sameclass is safe only becausedocis read once and the loaded containers are stable. Adversary: see below.CI.
list-unit-files: rc=1failure is the known flake CI: linux.yml S1 unit-classifier probe fails intermittently on ubuntu-24.04 (list-unit-files tendcf-s1-gen* rc=1) #51, and the job passed on attempt 3 (all 4 legs green, including the root-owned install steps).Follow-ups filed: #57 (installer: validate before publish, roll back on a refusal), #58 (concurrent publishers), #59 (control-character report fixture; consider
--no-augments), #60 (keys of ~996+ characters,match-scope keys, root-only channels).Adversary verdict (round 4, head 5a2228d). "APPROVE, no Critical, High, Medium or Low findings. Round 3's L1 is closed: noverdict is a positive problem class with literal-argument guards, decided after the two classes it reads. json_same cannot hide a difference and cannot be preset through a channel the check accepts." Its four Info notes: I1 and I2 (class-name length thresholds, and
-D tendcf_cmdb_json_same_<k>as one more root-only channel) are added to #60; I3 confirmskey_clean; I4 says the one-file rationale is untested and should be re-tested before any split.🤖 Generated with Claude Code
Note
High Risk
Changes core supervision gating: any CMDB/loader mismatch now blocks all interlocks, services, and tombstones on every agent run, with large new policy surface area and extensive behavioral tests.
Overview
Adds a fail-closed CMDB cross-check (proposal §13 option 3) so a partial or inconsistent
host_specific.jsonload cannot leave services ungated when interlocks are skipped.The new
bundle common tendcf_cmdbintendcf_services.cfreadshost_specific.jsononce, compares everyvarskey todata:variables.*(keys, entry ids, and fullstorejson()content), and rejects extra sections, non-identifier keys, foreign CMDB/augments presets, and uncomparable or inconclusive comparisons. On any problem it setstendcf_cmdb_refused, clearsinterlock_ids/service_ids, blockssystemctl daemon-reload, andtendcf_interlocksreports the mismatch once with no actuation.put_dataintendcf-install.shnow installs CMDB data via write-then-rename so the agent never sees a half-written file. The architecture doc records the implementation;tests/policy/run.shgains checks 9–11 (real loader,sim-loader.cfstand-in, andprobe-mutate.cffor mid-run file replacement) plus JSON fixtures.Reviewed by Cursor Bugbot for commit 5a2228d. Bugbot is set up for automated code reviews on this repo. Configure here.