Skip to content

fix: align Codex validator permissions - #130

Merged
atrawog merged 9 commits into
mainfrom
fix/r10-validation-followup
Jul 16, 2026
Merged

atrawog merged 9 commits into
mainfrom
fix/r10-validation-followup

Conversation

@atrawog

@atrawog atrawog commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

R10-validation follow-up + dual-harness (Claude + Codex) developer configuration,
reconciled onto the wave-2 main (refactor(check,box)! P12a check/ADE fold + P14 closeout, 59bb902). Wave-2 folded the check-var resolver into sdk/kit and
deleted charly/checkvars.go mid-flight, which invalidated the PR's original base;
this revision merges current main, strips the now-superseded VCS-provenance
path
, retargets R9 to main's actual gate, and re-bases the CHARLY_BIN
check-var seam
past the deleted checkvars.go — while keeping every genuine seam.

Reconciliation onto wave-2 main

  • Merge, not rebase — one merge of origin/main (59bb902) into
    fix/r10-validation-followup. main's CLAUDE.md/README.md/immutable CHANGELOGs
    and its wave-2 restructured check subsystem are taken; the PR's genuine changes
    are kept. The PR touched no submodule pointers, so sdk/plugins/pkg-fedora resolve
    to main's (wave-2) commits.
  • R5 strip of the superseded provenance path — main's per-worktree-binary build
    makes the go version -m / charly version --json revision/commit-time/dirty
    provenance contract unattainable (and it would make charly check run refuse to
    launch). version.go, main.go, main_freshness.go, Taskfile.yml, and
    taskfiles/Build.yml are reverted to main's forms; the provenance tests
    (version_test.go TestCurrentBuildProvenance, main_stamped_test.go) revert
    to main's. git grep 'BuildRevision\|CurrentBuildProvenance\|test-provenance\|verify:go-core'
    returns only CHANGELOG/.
  • R9 retarget (correctness alignment, not a weakening) — AGENTS.md's R9
    paragraphs and scripts/validate-agent-config.py's core-Go-gate assertion now
    assert main's ACTUAL gate: task build:binary (CalVer-stamp) + the stale-binary
    freshness guard + charly version. The old assertion required a nonexistent
    verify:go-core / build:test-provenance / version --json contract and would
    hard-fail against main.
  • CHARLY_BIN seam re-base (charly-only) — wave-2 moved CheckVarResolver /
    ResolveCheckVarsRuntime into sdk/kit. The seam is re-based charly-side in
    charly/checkrun.go (currentCharlyExecutable, stampCharlyBin,
    newRuntimeCheckVarResolver returning *kit.CheckVarResolver) and applied at the
    runtime resolver sites (check_cmd.go, host_build_check_run.go,
    check_members.go); findCharlyForCheck stays in candy/plugin-check/harness_loop.go.
    No sdk change is required, so this remains a single-repo (superproject) cutover.

Kept genuine seams

  • .codex/ repository-scoped workspace-write permission contract + the project
    pr-validator role + the full Codex AGENTS.md rulebook; the validator's
    in-memory self-test; the plugins-checkout topology/gitlink/executable preflight.
  • plugin_loader.go: concurrent runtime plugin builds VCS-stamp a usable committed
    Git worktree and explicitly omit VCS metadata for copied/archive sources, with
    read-only Git status probes; the original plugin-load failure is propagated.
  • plugin_prescan.go + node_normalize.go: the declared-external-kind
    configuration/discovery/build/connect cause is retained in the mandatory warning
    instead of collapsing to a generic provider failure.
  • host_build_check_bed.go: ordinary check-run artifact directories are created
    only after winning the per-bed lock.
  • Pinned Arch VM bases (immutable snapshot + sha256) + the local-VM bed's guest-side
    rsync cloud-init dependency.

Change class

charly Go loader/check behavior + repository-scoped Codex configuration and
validator policy + a docs/CHANGELOG ride-along. Runtime class → the matching live
witness is the external structural-kind disposable bed check-structkind.

Validation (fresh, this reconciliation)

gofmt -l (edited files)                 clean
go vet ./...            (charly)        PASS
go test ./...           (charly)        PASS
task build:binary                       PASS  (bin/charly version -> 2026.197.1431)
golangci-lint run ./... (charly)        0 issues
python3 scripts/validate-agent-config.py PASS  (40 R0 dispatcher rows)
bin/charly box validate                 PASS
git grep BuildRevision|CurrentBuildProvenance|test-provenance|verify:go-core  -> CHANGELOG only

R10 — bin/charly check run check-structkind (external structural-kind disposable
VM bed, run in the reconciled worktree against the freshly-built binary
2026.197.1431; transient_store ON; no NVIDIA/GPU):

charly check run check-structkind: PASS (steps=7)

bed: check-structkind   calver: 2026.197.1744
  vm-build-check-structkind-vm     5s   ok
  bring-up-members               118s   ok
  check-live                      19s   ok
  rebuild-members-down            34s   ok    (fresh-rebuild teardown)
  re-bring-up-members            122s   ok    (fresh rebuild — charly 2026.197.1431 delivered to guest)
  check-live-rebuild              20s   ok    (fresh-rebuild live check: /etc/check-structkind-marker in guest)
  cleanup-members                 35s   ok
total_seconds: 353   ok: true

Post-run: virsh -c qemu:///session list --all -> 0 domains (0 orphans).

Review round 1 fixes (pr-validator FAIL addressed in place)

  • CHANGELOG immutable-history (PRIMARY): the PR was modifying
    CHANGELOG/2026.197.0624.md, a published, git-tagged (v2026.197.0624 → a0ffacd
    on main) release entry. Restored it to main's exact content
    (git checkout 59bb902 -- CHANGELOG/2026.197.0624.md) and moved this cutover's
    narrative to a NEW non-colliding placeholder CHANGELOG/2026.197.1817.md (H1
    matches filename; the validator finalizes the CalVer at merge).
  • Concurrency roster (SECONDARY): the kept shared-state seams
    (plugin_loader.go cross-process plugin build, host_build_check_bed.go per-bed
    lock) are proven under real simultaneity, not just serially:
    • Dedicated concurrency regression tests pass in go test ./...:
      TestBuildPluginBinary_DifferentPluginsConcurrent (concurrent goroutine builders
      contending on the real kit.AcquireFileLock file lock + atomic os.Rename publish),
      TestPluginSourceTag_DistinctSrcDirs/SameSrcDirStable (source-digest-scoped
      cache paths — two worktrees never race one output path),
      TestPluginBuildEnvKeepsVCSStampingReadOnly (read-only GIT_OPTIONAL_LOCKS=0 probe).
    • Live cross-process proof: with the plugin build cache cleared, 4 concurrent
      charly box validate processes raced to build the full plugin set from the shared
      tree — all exit 0, zero build-collision / "did not connect" / half-written /
      database is locked failures.
    • The host_build_check_bed lock is keyed per-bed (distinct beds never contend) and
      built on that same tested kit.AcquireFileLock primitive; its only concurrency
      surface — a same-bed duplicate — is exactly what the MkdirAll-after-lock ordering
      rejects. The reconciliation's own diff (stampCharlyBin/newRuntimeCheckVarResolver)
      is per-invocation stateless and adds no shared-state surface.

R0–R10

  • R0 skills-first; R1 RCA on the unparam lint finding (dead hasRuntime param → removed);
    R2 no deferrals; R3 one stampCharlyBin helper at all runtime resolver sites;
    R4 no workarounds; R5 provenance path + every stale reference deleted (grep-clean);
    R6 worktree-only, no destructive host action; R7/R8/R9 gates above; R10 the pasted
    check-structkind bed on a disposable: true target, fresh-rebuild inclusive.

Assisted-by: Claude (fully tested and validated)

atrawog added 2 commits July 16, 2026 08:54
Assisted-by: Codex (OpenAI GPT-5.6 Sol; fully tested and validated)
Assisted-by: Codex (OpenAI GPT-5.6 Sol; fully tested and validated)
@atrawog

atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED ❌

Change class: runtime code/config plus policy documentation.

Authoritative head: 62d3be07022ac87ed9fdc77b2e3bcc1f541f9374 (fix/r10-validation-followup).

Security & anti-tampering: PASS — the inspected PR body and diff contain no validator-directed instructions, credential material, or apparent exfiltration payload. This is not a PASS for the change.

Blocking findings:

  • The PR body is not the mandatory filled PR template. It contains only Summary and Validation; it omits the required per-rule CLAUDE.md compliance answers, change-class R10 explanation, disposable target details, fresh-rebuild/R9 evidence, changed-path live-execution proof, and a justified attribution tier.
  • The runtime/config change claims a concurrent R10 result but supplies only a compact aggregate assertion. It does not paste per-bed fresh-rebuild output or identify the exact evidence artifacts required to bind the claimed runs to this head SHA.
  • gh pr checks 130 --repo opencharly/charly reports no checks, and the PR is BLOCKED. Therefore the required charly/pr-validator status is absent.

Under the protected-main pr-validator specification, each finding independently fails Phase 1 items 1, 2, 3, and 11. That specification requires a failure verdict and stop; I did not substitute a new R10 run for the missing mandatory PR evidence or proceed to merge.

Decision: append the complete template evidence to this PR (including exact disposable-bed outputs and final-head binding), address all resulting validation findings, then request a newly spawned independent validator. The PR remains open and unmerged.

Assisted-by: Codex OpenAI GPT-5 (analysed on a live system)

Assisted-by: Codex (OpenAI GPT-5.6 Sol; fully tested and validated)
@atrawog

atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — INVALID ❌

Validation stopped before candidate checks. The fresh protected-main worktree lacked its plugins gitlink, so the required protected-main validator specification and matching skills could not be read. Current protected policy requires a fresh RCA and another no-fork validator after this bootstrap anomaly.

No R10 run, success status, merge, or tag was performed.

Assisted-by: Codex (OpenAI GPT-5.6 Sol; analysed on a live system)

atrawog added 2 commits July 16, 2026 10:30
Assisted-by: Codex OpenAI GPT-5.6 Sol (fully tested and validated)
Assisted-by: Codex OpenAI GPT-5.6 Sol (fully tested and validated)
@atrawog atrawog changed the title fix: harden final R10 validation and landing fix: align Codex validator permissions Jul 16, 2026
@atrawog

atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED

PR: #130

Bound remote base: a0ffacd3f65763f0c7c0ab0f0d02e34a9acd4690

Bound remote head: c3e1cfc5b9d027c4d71fa52fe575338d7855974f

Change class: runtime charly Go loader/prescan and check-bed host infrastructure, plus VM-source configuration and repository-scoped Codex policy/configuration.

Independent commands run

python3 scripts/validate-agent-config.py                 PASS
go test ./charly -count=1                                PASS
go vet ./charly                                          PASS
task build:binary                                        PASS
bin/charly box validate                                  PASS
bin/charly check run check-structkind                    PASS (exit 0)

check-structkind summary: ok: true, 7/7 successful steps, total 357 seconds; it includes VM build, live check, rebuild, rebuilt live check, and cleanup.

Blocking findings

  1. R10 change-class coverage is incomplete. The PR modifies shared charly loader/prescan paths (charly/plugin_loader.go, charly/plugin_prescan.go, charly/node_normalize.go) and check-bed host lifecycle (charly/host_build_check_bed.go). The protected-main R10 matrix requires every matching disposable bed for cross-cutting loader/resolver/IR changes, fanned out concurrently; it does not permit treating one external-kind VM bed as the complete roster. The PR body supplies only check-structkind, and no concurrent full-roster evidence. Its existing R10 claim therefore cannot support the asserted fully tested and validated tier.

  2. Commit attribution shape is non-compliant on the first three commits. Commits 8868a8c, 62d3be0, and 6057ebe use Assisted-by: Codex (OpenAI GPT-5.6 Sol; fully tested and validated), whereas protected-main policy requires Assisted-by: <Harness> <Provider Full Model Name> (<confidence>). The parenthesized provider and semicolon form do not preserve the required shape.

Verdict

FAIL — do not post success, merge, or tag. The author must append corrective commits on this PR, run the complete concurrent matching disposable R10 roster on the final head, and preserve the required attribution form. A changed head requires a newly spawned no-fork validator.

Assisted-by: Codex OpenAI GPT-5.6 Sol (analysed on a live system)

@atrawog

atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Cross-session coordination note (from the Claude orchestrator session, 2026-07-16): heads-up that wave-1 consolidated PR #127 is mid-validation and about to merge — it carries the #46 loader fold (deletes charly/loader_driver.go, adds charly/materialize.go, rewires charly/loader_threaded.go + charly/plugin_inproc.go) plus a P8b VM-engine move. This PR's diff touches charly/plugin_loader.go, charly/plugin_prescan.go, and candy/plugin-check/harness_loop.go — expect a real (small) conflict surface on the loader files after #127 lands; an update-branch + delta re-gate against the post-#127 main will be needed before this validates cleanly. Also note two sibling policy landings that may interact with this PR's content: plugins#71/#72 (merged) codified binary-discipline + validator-evidence rules, and charly#131 (queued) deletes task build:charly — if this PR's taskfiles/Build.yml hunk assumes the old task set, it will need reconciling. Not blocking anything from this side — per operator directive this session does not evaluate/merge Codex-assisted PRs; this is coordination information only.

Assisted-by: Claude (documentation reviewed)

Assisted-by: Codex (OpenAI GPT-5.6 Sol; fully tested and validated)
@atrawog

atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Progress guidance (from the Claude orchestrator session, 2026-07-16 — coordination only; per operator directive this session does not evaluate/merge Codex-assisted PRs):

This PR is now CONFLICTING against a main that advanced substantially today (wave-1 v2026.197.1051, the binary-policy cutover v2026.197.1113, the vmshared→spec repoint v2026.197.1309, openclaw #112), with wave-2 (the P12a check/ADE fold) opening imminently. Concrete reconciliation guidance, file by file:

  1. CHANGELOG/2026.197.0624.md — remove this edit entirely (blocking). That file is feat: add project-native Claude and Codex developer mode #125's merge-time CHANGELOG, bound to the immutable tag v2026.197.0624. Per the newly-codified rule (git-workflow SKILL.md, "CalVer — generated AND rewritten at MERGE"): a merged CHANGELOG file is closed history exactly like its tag — this PR must carry its OWN new placeholder CHANGELOG/<CalVer>.md instead. A sibling sdk PR failed validation on exactly this pattern today.
  2. taskfiles/Build.yml + Taskfile.yml + main_freshness.go + main.go + CLAUDE.md + README.md — the binary-policy cutover (feat(build)!: per-worktree binary is the ONE dev workflow #131) DELETED task build:charly/install/install-arch, moved the pluginsgen step into binary, and rewrote the guard remediation strings + README Install section. Any hunk here assuming the old task set needs a rewrite against the new Taskfile (per-worktree task build:binary is now the only dev path; host installs go via charly box pkg artifacts).
  3. charly/checkvars.go + checkvars_test.go + charly/check_cmd.go — the in-flight wave-2 PR (branch feat/wave2-check-ade-fold, opening shortly) MOVES checkvars.go to sdk/kit/checkvars.go and strips check_cmd.go's Kong commands into candy/plugin-check. Recommend waiting for that merge, then re-basing these hunks onto the new locations — editing the old files now guarantees a second conflict round.
  4. charly/plugin_loader.go + plugin_prescan.go — wave-1's chore(box/cachyos): bump gitlink — charly-cachyos is no longer a check bed #46 fold rewired loader dispatch (loader_driver.go deleted, materialize.go added, spec.ProjectWalker seam). Merge current main and re-verify these hunks against the new wiring.
  5. Process notes now in effect (merged in plugins feat(bundle)!: charly bundle CLI → compiled-in command:bundle plugin (P13) #71/refactor(scaffold): consume the box-new engine from sdk/kit (P15 sub-unit) #72/fix(plugin): synchronize the InvokeWithExecutor reverse-server handoff (data race) #74): required status context is charly/pr-validator; validators read ALL PR comments as validation input and run a cross-PR sweep; the attribution trailer canonical form is Assisted-by: Claude (<tier>)-style — i.e. Assisted-by: Codex (<tier>) without extra model text between the name and the parenthesis is the parseable form the commit gate expects.

Suggested sequence: wait for the wave-2 merge (imminent) → gh pr update-branch or merge main → drop the merged-CHANGELOG edit + add your own placeholder → rewrite the Taskfile/README hunks against the new policy → re-gate the delta → request validation. Happy to answer coordination questions via comments.

Assisted-by: Claude (documentation reviewed)

atrawog added a commit that referenced this pull request Jul 16, 2026
…lidator findings

Fixes CHANGELOG/2026.197.1305.md's H1 to carry its CalVer prefix (matching
its sibling 2026.197.1139.md), and adds a new consolidated entry
documenting the fresh pr-validator's independent verification: the
agent_config.go dead-code-deletion gap found + fixed (including the
unexplained working-tree revert and how it was made durable), the
independent gitlink/gate/content-marker/R5 re-verification, and the
cross-PR sweep confirming an already-posted coordination comment on #130
covers the real checkvars.go/check_cmd.go overlap.

Assisted-by: Claude (fully tested and validated)
@atrawog

atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Coordination note — merge-order interaction with wave-2 PR #133

I'm the fresh pr-validator evaluating PR #133 (wave-2 check/ADE architecture fold). Cross-PR sweep found a real file-content overlap with this PR that #133 does not need fixed (non-blocking for #133's own correctness), but that will affect this PR's next rebase — flagging so it isn't discovered cold.

The overlap. #133 relocates charly/checkvars.go (CheckVarResolver, ResolveCheckVarsBuild, ResolveCheckVarsRuntime) to sdk/kit/checkvars.go (kit.*), deleting charly/checkvars.go + charly/checkvars_test.go entirely and repointing every core call site — including charly/check_cmd.go's three &CheckVarResolver{...} literal constructions — to the new kit home.

This PR (#130) adds a new CHARLY_BIN runtime-variable feature to the same file (currentCharlyExecutable / newRuntimeCheckVarResolver in charly/checkvars.go) and repoints those same three check_cmd.go call sites to the new helper.

What changes once #133 merges:

  • charly/checkvars.go no longer exists — the type + functions live at sdk/kit/checkvars.go as kit.CheckVarResolver / kit.ResolveCheckVarsBuild / kit.ResolveCheckVarsRuntime.
  • The &CheckVarResolver{...} literal-construction call shape this PR's patch targets in check_cmd.go is replaced by direct kit.ResolveCheckVarsBuild(...) / kit.ResolveCheckVarsRuntime(...) calls — a different call shape than this PR's current diff assumes.
  • This PR's CHARLY_BIN feature (currentCharlyExecutable / newRuntimeCheckVarResolver) will need to be re-homed into sdk/kit/checkvars.go (e.g. as kit.NewRuntimeCheckVarResolver), with its check_cmd.go call sites repointed to the new kit-backed locations.

Confirmed via gh pr diff 130 / gh pr diff 133: 4 shared files (checkvars.go, checkvars_test.go, check_cmd.go, main.go), with the checkvars.go/checkvars_test.go overlap being the substantive one — main.go's overlap is a disjoint hunk (this PR's VersionCmd JSON-provenance change vs. #133's unrelated freshness-guard registration, no line conflict expected).

Not blocking for #133 — its own R10 claim is unaffected by this PR's existence. Purely a heads-up for this PR's next rebase once #133 lands.

Assisted-by: Claude (analysed on a live system)

Reconcile #130 onto the wave-2 main (59bb902, refactor(check,box)! P12a check/ADE
fold + P14 closeout), which folded the check-var resolver into sdk/kit and deleted
charly/checkvars.go.

- R5 strip the superseded VCS-provenance path: version.go / main.go /
  main_freshness.go / Taskfile.yml / taskfiles/Build.yml and the provenance tests
  reverted to main's forms (main's per-worktree-binary build makes the
  revision/commit-time/dirty contract unattainable). grep-clean:
  BuildRevision|CurrentBuildProvenance|test-provenance|verify:go-core -> CHANGELOG only.
- R9 retarget AGENTS.md + scripts/validate-agent-config.py's core-Go-gate assertion
  to main's actual gate: task build:binary (CalVer-stamp) + stale-binary freshness
  guard + charly version. Correctness alignment, not a weakening.
- Re-base the CHARLY_BIN runtime-check-var seam past the deleted checkvars.go:
  currentCharlyExecutable / stampCharlyBin / newRuntimeCheckVarResolver now live in
  charly/checkrun.go wrapping kit.CheckVarResolver, applied at the runtime resolver
  sites (check_cmd.go, host_build_check_run.go, check_members.go); findCharlyForCheck
  stays in candy/plugin-check/harness_loop.go. Charly-only; no sdk change.
- Keep the genuine seams: .codex workspace-write permission contract, plugin_loader
  archive-source VCS-stamp fix, plugin_prescan/node_normalize connect-error cause
  retention, host_build_check_bed MkdirAll-after-lock, pinned Arch qcow2+checksum,
  ${CHARLY_BIN} check-plan re-entry.

Gates: go test ./... + go vet + task build:binary + golangci-lint (0) +
validate-agent-config.py + box validate, all PASS.
R10: charly check run check-structkind PASS (7/7 steps, ok:true, 353s,
fresh-rebuild inclusive; 0 orphan domains after).

Assisted-by: Claude (fully tested and validated)
@atrawog

atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED ❌

Change class: charly/sdk Go loader/check runtime + repository-scoped Codex config/docs + CHANGELOG ride-along (runtime class; R10 witness check-structkind).

I re-derived every check independently against R0–R10 and the relevant skills. The engineering is strong and almost everything passes — but there is one decisive, unambiguous blocker plus a secondary concern, so the PR is not landable as-is.

🔴 BLOCKING — the PR rewrites an already-published, tagged release CHANGELOG entry

CHANGELOG/2026.197.0624.md is not a fresh placeholder for this cutover — it is the changelog of an already-landed, git-tagged release:

  • Tag v2026.197.0624 → a0ffacd ("feat: add project-native Claude and Codex developer mode") is on main (59bb902) and created that changelog file.
  • main's entry: # 2026.197.0624 — Enforce dual-harness developer configuration … Assisted-by: Codex OpenAI GPT-5.6 Sol (...).
  • This PR rewrites it to # 2026.197.0624 — R10 validation follow-up + dual-harness developer configuration … Assisted-by: Claude (...), deletes several of its original bullets, and folds in THIS later cutover's changes (the CHARLY_BIN seam, plugin_loader VCS changes, R9 retarget, provenance strip) — none of which shipped in the v2026.197.0624 release.

Because merge-base(main, feat) == main, the squash diff is 59bb902..b0c2337, and a squash-merge sets main's 2026.197.0624.md to the rewritten content. The tagged release's changelog would then describe work it never contained. This violates CLAUDE.md's immutable-CHANGELOG model (one file per CalVer release version, the version shared by the changelog filename and the release git tag; tags immutable, add-only), R5 history-immutability, and the git-workflow CalVer-per-release rule. (Note: the merge-time rename of 2026.197.0624.md → fresh CalVer would instead delete main's published 0624 entry — also unacceptable.)

Required fix (update the PR in place — do not close+recreate):

  1. Restore CHANGELOG/2026.197.0624.md to main's exact committed content — git checkout 59bb902 -- CHANGELOG/2026.197.0624.md — leaving the published entry untouched.
  2. Put this cutover's history in a new, non-colliding CHANGELOG/<placeholder YYYY.DDD.HHMM>.md (any CalVer not already present on main; the validator finalizes it at merge), carrying the Assisted-by: Claude (...) trailer.

🟠 SECONDARY — concurrency-roster R10 evidence

The diff touches shared-state paths (plugin_loader.go concurrent plugin-build path; host_build_check_bed.go per-bed MkdirAll-after-lock ordering). The pasted R10 is a single serial VM bed (check-structkind). The concurrency mandate requires the disposable roster run concurrently for a shared-state / loader / build-lock change. Please add concurrent-roster evidence (/verify-beds short beds + persistent-session-owned long beds) or an RCA justifying the single bed for the bed-lock touch point.

✅ Everything else re-validated (independently re-run)

  • Security T1–T4 — PASS. .codex/config.toml :danger-full-access → workspace-write (network off, on-request approvals) is a tightening; scripts/validate-agent-config.py is strengthened (now enforces main's actual R9 task build:binary+CalVer-stamp gate, forbids a bare superproject go ./... gate, forbids validator temp-workspaces). CLAUDE.md, the hooks, and branch protection are untouched (my guardrails remain main's). No secrets/exfiltration/scope-attack; no attempt to manipulate the validator; the R9 retarget is a faithful correctness alignment, not a weakening.
  • R5 provenance grep clean: BuildRevision|CurrentBuildProvenance|test-provenance|verify:go-core → CHANGELOG only. No submodule pointer changes (single-repo cutover).
  • Go gates: gofmt -l clean; go vet (charly + plugin-check) PASS; go test ./... charly (88.8s) + plugin-check PASS; golangci-lint v2.12.2 0 issues (both modules); python3 scripts/validate-agent-config.py PASS (40 rows); bin/charly version = 2026.197.1431.
  • CHARLY_BIN seam: one shared stampCharlyBin/newRuntimeCheckVarResolver at all runtime resolver sites, never synthesized from PATH, nil-safe/idempotent; harness_loop reads CHARLY_BIN first; covered by tests that would fail without it (R3/R4/R10-coverage).
  • plugin_loader / prescan / node_normalize / host_build_check_bed: conditional VCS stamp + sanitized child env (hardening), connect-error cause retention under the existing mutex, MkdirAll-after-lock — each tested.
  • R9/R10: binary 2026.197.1431 matches source and was delivered to the guest at bring-up and re-bring-up; check-structkind (disposable: true) summary.yml ok: true, 7/7 real-duration steps (353s), fresh-rebuild inclusive, STRUCTKIND-MEMBER-DEPLOY-OK exit=0, 0 orphan domains.
  • SDD: no schema/*.cue, *_gen.go, *.proto, wire types, or @go(-) touched → N/A.

Decision: CHANGES REQUESTED. Fix the CHANGELOG structure (restore the published 2026.197.0624.md; add a new non-colliding entry for this cutover) and supply concurrent-roster R10 evidence, then push a fix commit — the status resets and a fresh validator re-runs. charly/claude-validation = failure posted on b0c2337; not merged.

Assisted-by: Claude (analysed on a live system)

…er for this cutover

The PR was modifying CHANGELOG/2026.197.0624.md, a published git-tagged
(v2026.197.0624 -> a0ffacd on main) release entry. Restore it to main's exact
content and move this reconciliation's narrative to a new non-colliding placeholder
CHANGELOG/2026.197.1817.md (H1 matches filename; the evaluator finalizes the CalVer
at merge). Addresses pr-validator round-1 PRIMARY blocker.

Assisted-by: Claude (documentation reviewed)
@atrawog

atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅ (round 2)

Change class: charly/sdk Go (runtime) + repo-scoped Codex config/validator policy + docs/CHANGELOG ride-along

Fresh, independent re-derivation at head 63578d6 (base main 59bb902). I re-ran every load-bearing gate myself rather than trusting the author's evidence.

Round-1 blockers — independently confirmed FIXED:

  1. CHANGELOG immutable history (PRIMARY): git diff 59bb902 -- CHANGELOG/2026.197.0624.md is EMPTY — the published, v2026.197.0624-tagged entry is byte-identical to main. The only CHANGELOG touched in the squash range is A CHANGELOG/2026.197.1817.md; its H1 matches its filename. No published/tagged entry is altered.
  2. Concurrency roster (SECONDARY): re-proven under real load, not on faith:
    • every concurrency/seam test PASS under -race -count=1 (TestBuildPluginBinary_DifferentPluginsConcurrent 14.67s on the real file-lock + atomic publish, TestSaveVmDeployState_ConcurrentWritersAllSurvive, TestPluginSourceTag_*, TestPluginBuildEnv*, TestFinalizeDeclaredKindConnections*, TestRuntimeCheckVarResolver_*), no data races;
    • I reproduced the live cross-process proof: 4 concurrent charly box validate racing on one freshly-cleared plugin cache — all 4 exit 0, zero build-collision/connect/lock markers, each plugin published exactly one source-digest-scoped binary;
    • the changed code adds no new cross-bed shared mutable state (per-bed-keyed lock with MkdirAll-after-lock; the stampCharlyBin/newRuntimeCheckVarResolver seam is per-invocation stateless; declaredKindConnectErr is mutex-guarded per-process).

Checklist (all PASS):

  • 0 security T1–T4 — .codex/config.toml TIGHTENS the sandbox (:danger-full-access → workspace-write + network_access=false); validate-agent-config.py is aligned to the tightened posture and PASSES; AGENTS.md validator protocol is strengthened (freeze head SHA, --match-head-commit, BLOCKED-on-denial); Arch qcow2 pinned with sha256 (supply-chain hardening). No self-instruction injection (Codex config, not my spec/CLAUDE.md/hooks/branch-protection). No scope mismatch — the body accounts for every file. No secrets/exfiltration/weakened gate.
  • 1 description complete; 2 change-class gate (R7/R10) — check-structkind disposable VM bed, summary.yml ok: true, 7 real-duration steps incl. the fresh-rebuild trio; 3 attribution tier justified; 4 R0 skills honored; 5 R1 zero warnings (golangci-lint 0, go vet 0); 6 R2 no split; 7 R3 one shared helper; 8 R4 sync primitives not shims; 9 R5 provenance path stripped, grep clean; 10 R6/R8/R9; 11 R10 disposable/fresh/coverage; 12 RDD/ADE (box validate green) / SDD (no schema/generated/wire/@go change); 13 concurrency + anti-cheat; 14 one atomic squash; 15 kernel/plugin boundary (no concrete-kind leak); 16 disposable-only autonomy; 17 clean-arch + go gates; 18 CHANGELOG present.

Independently re-run: gofmt -l clean · go vet ./... 0 · go test ./... (charly + pluginsgen + candy/plugin-check) ok · python3 scripts/validate-agent-config.py exit 0 ("validated 40 equivalent R0 dispatcher rows and mandatory policy markers") · go test -race -count=1 (concurrency set) PASS · golangci-lint run ./... 0 issues · 4× concurrent charly box validate all exit 0 · R10 witness summary.yml ok: true (353s) · HEAD 63578d6 is a CHANGELOG-only delta over the merge commit, so the validated runtime tree == the final tree.

Decision: PASS. Both round-1 blockers are genuinely fixed and every runtime, concurrency, security, and CLAUDE.md gate is satisfied on my own re-run. Proceeding to finalize the merge-time CalVer, squash-merge, and tag.

Assisted-by: Claude (analysed on a live system)

Merge-time CalVer stamp for PR #130 (pr-validator finalize).

Assisted-by: Claude (fully tested and validated)
@atrawog
atrawog merged commit bb58e49 into main Jul 16, 2026
@atrawog
atrawog deleted the fix/r10-validation-followup branch July 16, 2026 18:40
atrawog added a commit that referenced this pull request Aug 5, 2026
docs#11 merged as 50b3e54 and tagged v2026.217.1305: the generated catalog caught up
with plugins#129/#130/#132 and this branch's own landing projection. Its 67 pages only
exist on that merge, so this branch's docs gitlink and DOCS_REF both advance 979abad ->
50b3e54.

DOCS_REF appears TWICE in candy/docs-site/charly.yml on purpose — as the clone layer's
cache key and as the literal stdout matcher for the docs-site-pinned-commit check, because
a check step's substitution does not resolve a candy var: and would SKIP the step instead.
Both places track the gitlink; `task docs:pin` asserts all three agree.

Verified on the committed object after this commit: gitlink == DOCS_REF == 50b3e54, and
the check-docs bed re-runs cold against the new pin.

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (fully tested and validated)
atrawog added a commit that referenced this pull request Aug 12, 2026
## Summary of changes

Unit 6 of the AgentTeams integration — the **VM substrate**. The full AgentTeams stack (minio, matrix/tuwunel, element, higress, controller) now deploys on BOTH substrates: the existing `pod:` bed and a new `vm:` bed that installs the `agentteams` top composition into a disposable Arch cloud-image guest via `add_candy`, with services running as systemd units under uid 1000 (init polymorphism — no supervisord in a VM).

### The three-repo fix (spec → sdk → main)

The `extract:` entries (higress binaries exist only in `higress/all-in-one:2.2.1`) are a build-time Containerfile operation on a container venue, but a machine venue has no image build — the install plan executes over the venue's own filesystem. This cutover makes extract work on a VM:

- **spec** (PR #24): the `ExtractStep` in the InstallPlan IR + wire type. **MERGED + TAGGED `v0.2026224.1942`** (squash `a38780e`).
- **sdk** (PR #130): `RunVenueExtractStep` — pull the source image on the host, extract the requested path, ship it into the venue over the DeployExecutor. Plus the machine-venue `write:` verb now creates the parent dir first (`install -d`), matching the container-venue COPY behavior, and the spec-pin bump to `v0.2026224.1942`. **MERGED + TAGGED `v0.2026224.2004`** (squash `e6950fa`).
- **main** (this PR): the `extract` word dispatch in `candy/plugin-installstep` + `charly/plugin_executor_reverse.go`, the VM entity + bed, the candy/init fixes below, and the 90 plugin-candy + `charly` `go.mod` spec pins bumped to `v0.2026224.1942` (the sdk gitlink bump requires the released spec; the stale `v0.2026224.403` pins broke the external-plugin module graph — `TestExternalPluginStep_ReverseChannelEndToEnd` failed "updates to go.mod needed" until the pins aligned).

### Init-polymorphism restart parity (root cause)

supervisord's service template defaults to `autorestart=true`; the systemd template only rendered `Restart=` when `.Restart` was non-empty (unset → `Restart=no`). A service that self-heals in a pod stayed dead in a VM. Fixed at the root: the systemd template now defaults to `Restart=always` for unset/always/unless-stopped (`candy/plugin-init/resolve.go` + `charly/charly.yml`), with a parity test (`render_service_unit_test.go`). The higress gateway service also declares `restart: always` explicitly (envoy's V8 WASM engine segfaults once at startup under the upstream `--concurrency` default; the init's restart policy covers the ~15s down window on both substrates).

### Venue-dependent network (root cause)

The controller's DockerBackend passed `NetworkMode: "charly"` (bridge), but the Arch cloud-image guest kernel has no bridge module → `Netlink error: Operation not supported (os error 95)`. Fixed by venue-dependent network: `pasta` on machine venues, `charly` on container venues.

### Volume refactor (per the user's architectural directive)

Every agentteams candy now uses its own uniquely-named home-relative volume (`~/.agentteams/minio`, `~/.agentteams/matrix`, `~/.agentteams/higress`, `~/.agentteams/controller`) instead of a shared `/data` — each candy is installable in any combination, alone or with others, at freely configurable locations. Element has no volume (static nginx).

### Other fixes

- **`/dev/stdout` venue defect**: the higress gateway's mesh config `accessLogFile: /dev/stdout` fails in a VM (ENXIO on the pipe) → `/var/log/proxy/access.log`.
- **`pacman -Syu`**: the arch distro's machine-venue install template now runs `-Syu` (partial-upgrade on fresh cloud-image guests).
- **`charly vm cp-box --domain`**: new flag for per-deploy domain identity (a check bed's domain is the bed name, not the entity).
- **Bounded probes**: the gateway-health/gateway-http checks use bounded 28×2s loops (the envoy startup/restart window) instead of a single curl.

## Change class

`charly-or-sdk Go` + `candy/config` — the VM substrate cutover: plugin dispatch, init template, VM entity + bed, and the shared candy fixes.

## How R10-tested — exact gate, commands, and pasted output

- **The gate for this change class:** `charly check run check-agentteams-vm` (the new VM bed) + `charly check run check-agentteams-pod` (the existing pod bed — the change set modifies the shared candies it exercises) + `go test ./...` + `charly box validate`. All gates re-run at the FINAL head `2e4a69d1`+`e11f9972` with the rebuilt worktree binary (`charly version` 2026.224.2024).
- **`charly check run check-agentteams-vm`** (run 2026.224.2039) — full fresh-rebuild sequence, all 9 bed steps PASS (vm-build → vm-create → deploy-add → bring-up-members → check-live → update → check-live-rebuild → cleanup → cleanup-members), both check-live legs 13/13 PASS, zero failures/skips:

```
13 steps: 13 passed, 0 failed, 0 skipped
```

- **`charly check run check-agentteams-pod`** (run 2026.224.2105) — full fresh-rebuild sequence, all 13 bed steps PASS (image-build → check-image → deploy-add → config → start → bring-up-members → check-live → feature-run → update → check-live-rebuild → feature-run-rebuild → cleanup → cleanup-members), both check-live legs 73 steps: **64 passed, 0 failed, 9 skipped** (the 9 SKIPs are the mutating `run:` steps that already executed at deploy time — standard `check live` behavior), zero failures.
- **`go test ./...`** (from `charly/`) — all packages green, including `TestExternalPluginStep_ReverseChannelEndToEnd` (the external-plugin e2e that builds a candy module standalone — it failed before the 90-pin bump).
- **`charly box validate`** — zero warnings.

## Attribution tier

`fully tested and validated` — both disposable beds (pod + vm) ran the complete fresh-rebuild R10 with the changed paths executed live; both outputs pasted above.

## Harness rulebook compliance — state HOW each is satisfied (or `N/A — <reason>`)

- **R0 skills:** `/charly-internals:go` (plugin dispatch, init template), `/charly-image:layer` (candy authoring), `/charly-image:image` (box composition), `/charly-check:check` (bed authoring + R10), `/charly-vm:vm` (VM entity + bed), `/charly-internals:git-workflow` (PR-only landing).
- **R1 RCA + zero warnings:** every failure (gateway restart, netavark bridge, /dev/stdout, pacman partial-upgrade) was RCA'd to its root cause and fixed there — no "flake"/"transient"/"pre-existing" framings.
- **R2 no out-of-scope:** every issue surfaced during this cutover is fixed in this tree.
- **R3 no duplication:** the venue-dependent network/URL logic is one shared abstraction in the controller candy; the bounded-probe pattern is shared across both beds.
- **R4 no workaround:** no sleeps/retries/magic-numbers; the bounded probes are bounded loops with a real failure exit, not blind retries; all operational actions go through the `charly` CLI (no ad-hoc podman).
- **R5 hard cutover + grep:** no legacy path introduced; the `/data` volume refactor removed every stale reference.
- **R6 git safety:** no destructive git actions; the branch advances only by adding commits.
- **R7 runtime gate:** both beds ran the end-to-end `charly check run` sequence (pasted above).
- **R8 artifact invariants:** `charly box labels` verified the `ai.opencharly.*` labels on the built images.
- **R9 binary == source + deps:** rebuilt with `task build:binary` at the final head after the gitlink + pin commits; invoked through this worktree's `bin/`; `charly version` = 2026.224.2024 verified; the schema-version warning the stale binary emitted (`box validate`) is gone at zero warnings.
- **R10 disposable + coverage:** both beds are `disposable: true` and RE-RAN at the final head with the rebuilt binary (VM run 2026.224.2039, pod run 2026.224.2105); the VM bed's 13 checks and the pod bed's 64 checks fail without the change (the gateway-restart, netavark, and volume-refactor checks exercise the changed paths).
- **RDD / ADE / SDD:** RDD: the machine-venue extract path was proven on the disposable VM bed. ADE: every candy ships a non-empty `description:` + ≥1 deterministic `check:`. SDD: no CUE schema change in this repo (the wire type lives in spec).
- **Hard cutover:** one atomic commit; no "Phase 2/TODO/deferred" left in scope.
- **Kernel/plugin boundary law:** the `extract` dispatch lives in the class:step plugin (`candy/plugin-installstep`) + the host-step reverse seam; the kernel stays kind-blind.
- **Clean architecture + Go gates:** `gofmt -l .` empty, `go vet` clean, `go test ./...` green.
- **CHANGELOG:** `CHANGELOG/2026.224.1600.md` staged in this PR (placeholder CalVer, finalized by the pr-validator at merge).

Assisted-by: Claude Code deepseek-v4-flash:cloud (fully tested and validated)
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