Repository navigation
Overlay: replace B-5b with the all-or-nothing CMDB loader; libntech strict parse; overlay-build CI - #65
Conversation
…ch strict parse (B-24) Core patch 0002 is now a squash of the fork's CMDB loader (djbclark/core overlay/cmdb-all-or-nothing 4158906f2, tag tendcf-pin-4158906) onto the overlay base plus B-5a; it carries B-7 and B-20. libntech 0005/0006 are fork PR 11's dc3fba2 and 8a57e55 (B-24). The docs and CI follow in later commits. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Docs: upstream-overlay.md sections 2, 4, 5 (R1: check is textual only) and 7; upstream-register.md B-5b row and note, new B-24 row, ruling 2; validate proposal section 13 sentences; AGENTS.md; sim-loader.cf and run.sh header comments. CI: overlay-build job in linux.yml (upstream at the overlay bases plus overlay/, cmdb_test, json_test, mustache_test, 06_host_specific_data, run.sh with TENDCF_REQUIRE_FORK_LOADER=1). run.sh: the completion marker comment no longer claims the negative greps are the only assertions left, and policy_completed anchors on '^R: tendcf-test-done:'. 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: 5a998c6f-f8dd-411c-871d-1bc73c58c7d9) |
Codex Review Summary: ✅ CompletedThis 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. |
Same astral-sh/setup-uv@v5 step as check.yml. 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: 6ef811e7-36a8-4a4c-b90e-eb891e0a3282) |
…p setup-uv - docs/workflow/manifest: the overlay loader is the fork's source bar the R1 accessor; its tests pass on both builds; name the JSON-number difference (B-4, B-10, core rlist.c) with its effect and reach; open with djbclark - overlay.json applied_tree per component; bin/overlay.py apply fails on a mismatch (self-test +3 assertions, lint checks the id shape) - overlay-build: python3 bin/overlay.py, no setup-uv; summary from the manifest - nits: B-20 null guards wording, mustache_test and the env var in the §4 sentence, 0002 test names, register B-23/B-24 cell counts 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: deb810b0-321e-4f4d-bba6-c7903ef79028) |
…o 9 cells - drop unused shutil import; parenthesise the two implicit string concatenations in Finding lists (DRIFT and TREE MISMATCH) - B-22 row: fold the trailing '(test-only, no ticket)' cell into the Upstream cell so the row matches the 9-column 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: 593e6b23-93f7-4df2-b7db-6ff864f06624) |
…ired; ruff format; doc nits - apply_series: compare applied_tree only when HEAD is the pinned base, else report 'not compared'; a missing applied_tree on the base is a Finding - applied_tree is a required component key (lint); self-test sample manifest carries it; new cases: missing key, off-base not compared (21 assertions) - ruff format bin/overlay.py (whole-file, mechanical); ruff check clean - upstream-overlay.md: self-test count; overlay-build runs build-fork's steps, not the hand recipe 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: 4d7d24f7-fb9d-4afc-9fda-8103190a8c47) |
What changed
The overlay now carries the fork's all-or-nothing CMDB loader (operator ruling R13, "Replace" of 2026-11-14) instead of B-5b's per-entry skip, and a CI job builds and tests it.
overlay/core/0002replaces B-5b (8f0076b81): a squash of the fork's loader (4443504, the pin) onto overlay basea0bca6aaf+ B-5a. Branchoverlay/cmdb-all-or-nothingon djbclark/core, squash commit4158906f2a5b3f202af1615fb80357a9a85987cc, tagtendcf-pin-4158906(B-5a kept as its original patch, applied withgit am).0005,0006: fork PR Added JsonParseStrict() and JsonParseFileStrict() djbclark/libntech#11 (dc3fba2JsonParseStrict()/JsonParseFileStrict(),8a57e55null byte fix), as-is. New register id B-24.overlay/overlay.json: core entry isload-bearing, register B-5b (replaced), with B-7 as a passenger and B-20 as load-bearing;superseded_on_forkdropped; two libntech entries (B-24).overlay-buildjob (one ubuntu-24.04 leg) inlinux.yml: fetch core and libntech at the bases,bin/overlay.py applyboth, autogen/configure/make (same flags asbuild-fork), thencmdb_test, libntechjson_testandmustache_test, the06_host_specific_dataacceptance directory, andtests/policy/run.shwithTENDCF_REQUIRE_FORK_LOADER=1.upstream-overlay.mdsections 2, 4, 5 (explicit R1 caveat), 7;upstream-register.md(B-5b row and note rewritten as replaced, new B-24 row, ruling 2 status); validate proposal section 13;AGENTS.md;sim-loader.cfandrun.shheader comments.run.sh(PR 61 carry-overs): the comment calling the negative greps "the only assertions left on a non-fork run" is gone (the marker ensures they cannot pass on an invocation that never reached the policy);policy_completedis anchored to^R: tendcf-test-done:(the fixturetests/policy/fixtures/test-done.cfprints exactlytendcf-test-done: the entry policy evaluated ...as areports:promise, like the existing^R: tendcf: ...greps). Not run: Linux CI is the first run.Proofs for the squash (O2)
a.
git diff 4443504 4158906f2 -- libpromises/cmdb.c libpromises/cmdb.h tests/unit/cmdb_test.c tests/acceptance/00_basics/06_host_specific_datais three lines in two files, not one:cmdb.c:1040as the design said, and alsotests/unit/cmdb_test.c:70and:85, bothEvalContextVariableGetPlaintext(renamed toEvalContextVariableGet(. The design counted onlycmdb.c; the function does not exist at the base, so the test would not compile without the rename. Same symbol, same fix, no new 4443504-only symbol. The acceptance directory's file list equals 4443504's.tests/unit/Makefile.amgains the onecmdb_test \line (checked: it is the onlycmdbline in 4443504's Makefile.am).b. Against the design's scratch patch (
f4570cc8/scratch/cmdb-allornothing-squash.patch): identical except the twocmdb_test.clines above (and the blob hash on that file'sindexline).c. Dependency check (identifiers of the new
cmdb.c/cmdb_test.cagainst the base core tree, overlay + strict libntech, and 4443504): one candidate beyondGetPlaintext,JsonArrayContainsNull, isstaticand defined incmdb.citself (:314). Header diff base→4443504 for the identifiers used shows only theEvalContextVariableGet*change; libntech headers cc892efae vs overlay+strict show nothing for the identifiers used. This is a symbol analysis, not a build.B-7 and B-20
The fork's final
cmdb.ccontains B-20 (null crash,87490bb8f) and B-7 (dotted-key warning,ee1f9d60c), so they ride in the squash. B-20 is load-bearing (the loader's null validation relies on it); B-7 is a passenger (a warning). Both are recorded in the manifest and in the register B-5b note.Results (run locally, hermetic)
bin/overlay.py lint: 0 findings.self-test: 21 assertions pass (round 3).apply coreata0bca6aaf: HEAD76e9339, tree5c9f3ce18a6b290903b6610b58cb535638453822= the tree of4158906f2.apply libntechat0c0620d6c5f8(6 patches): tree8d5fda1f9938c6b69bb9bb4d8a6e3be6c174f9e0.git apply --checkof core 0002 on base+B-5a, libntech 0005 on 0004, 0006 on 0005: all rc 0.checkat base 2/2 and 6/6;check --againstupstream master (corea8ac0dc7e, libntech3c21479) 2/2 and 6/6;retired --strict: nothing to retire;xref_lint: 0 findings; shellcheck onrun.sh: clean; actionlint onlinux.yml: only findings that were already there (ubuntu-26.04label,debian-13SC2046).Caveats
EvalContextVariableGet(…, get_secret)(since671d53ff0), so the series applies there textually (checkgreen) but should not compile. The weeklyoverlay-driftjob cannot see that; documented inupstream-overlay.mdsection 5. Not built at that commit.json.cchanges (the fork pin'sjson.cdiffers by 82 lines). A strict-parse test that needs them would fail only inoverlay-build.cmdb.cbehaviour, and the CMDB call site ingeneric_agent.c(it logsFailed to load CMDB dataat ERR and goes on to evaluate policy) is the same block at the base and at 4443504 (I compared that block, not the whole file), so it needs no change for the overlay build. Not verified until CI runs.overlay-buildCI leg is the proof the overlay builds and passes (green at2f90f33; result at the merge head below).rlist.cnumber fix, so a hand-edited CMDB file with a top-level or primitive-array number such as1e5or an integer pastlongmakescf-agentexit in the install step, and a real installs as%.2f. Projected data never reaches it (bin/projector.pyrefuses floats). Documented inupstream-overlay.mdsection 7 andoverlay.json. Whether to carry those fixes in the overlay is open with djbclark; the default is to document and accept, so it does not block this PR.Prior art / docs checked:
docs/architecture/upstream-overlay.md,upstream-register.md,overlay/overlay.json,check.yml,linux.yml, thebuild-forkaction,tests/policy/run.sh, the design report (overlay-replace-a.md). Closing search: exempt (fork-overlay housekeeping).Review rounds
75db441: Fable changes-requested (A1: the "behaves like the fork" claims overreached on JSON numbers; A2: no applied-tree assertion; NITs A3-A7), Argon approve (one NIT), adversary approve with no blocking findings.ba60acf, tidy2f90f33): claims reworded to what CI proves plus the known-difference block;applied_treerecorded and asserted bybin/overlay.py apply;setup-uvdropped forpython3; NITs A3-A7 and Argon's NIT; register rows B-22/B-23/B-24 fixed to nine cells; ruff clean.1f379b5): the tree is compared only when HEAD is the pinned base (--allow-base-mismatchreports "not compared" instead of failing),applied_treeis a required manifest key, self-test count and theoverlay-buildwording inupstream-overlay.mdcorrected.bin/overlay.pywas also run throughruff format(whole file), so its diff is mostly formatting; the logic change is about 40 lines.Reviewers' verdicts
lintcatches first anyway; one self-test clause can never be false).bin/overlay.pydid not match the file, so only its docs findings were counted); round 3 approve, no findings (quotes checked against the file this round: all match).75db441): approve, no blocking findings; two medium items, one fixed in round 2 (the claims), one pre-existing and filed as a follow-up.Admission note: the round-1 Claude usage report was rate-limited at admission; each later re-review was re-planned against fresh quota first.
Follow-ups
JsonParseAsString, pre-existing on base and fork)rlist.cnumber fix in the overlay (follow-up PR), or keep the documented difference.🤖 Generated with Claude Code
Note
High Risk
Changes CMDB loading and strict JSON parsing for host-specific data—enforcement-critical paths—with behaviour still not fully proven equal to the pinned fork for JSON numbers (documented gap).
Overview
Replaces the overlay’s per-entry-skip CMDB patch (
8f0076b81) with the fork’s all-or-nothing loader (overlay/core/0002), plus libntech B-24 strict parse patches (0005/0006) that the loader calls viaJsonParseFileStrict(). The manifest records expected post-apply trees and retires the old B-5b reproduction story.bin/overlay.pynow requiresapplied_treeper component:applyasserts the git tree aftergit am, with lint and expanded self-tests around mismatches.Linux CI gains an
overlay-buildjob that checks out upstream at overlay bases, applies patches, compiles, and runscmdb_test, libntech JSON/mustache tests,06_host_specific_data, andtests/policy/run.shwithTENDCF_REQUIRE_FORK_LOADER=1—proving the overlay builds, not just that weeklycheckapplies textually (R1 accessor caveat documented).Docs (
upstream-overlay.md,upstream-register.md,AGENTS.md, validate proposal) and smallrun.shfixes (policy_completedanchored to^R:) align with the new overlay behaviour.Reviewed by Cursor Bugbot for commit 1f379b5. Bugbot is set up for automated code reviews on this repo. Configure here.