Skip to content

refactor: ONE deploy-shape classifier — the host composite dies (F1.2/F1.4) + wave tag pins - #563

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/f1-parser-consolidation
Sep 7, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/f1-parser-consolidation

Conversation

@atrawog

@atrawog atrawog commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Parser-consolidation F1 wave (Cutover F1, plan/nested-capture-architecture.md) — the charly host slice of F1.2/F1.4 + the wave's dependency pins.

  1. F1.2/F1.4 — ONE deploy-shape classifier. foldSubstrateKind's deploy-vs-template classification was an OR-composite: pl.IsDeployShape(pn) || len(pl.ResourceChildren(pn)) > 0 || agentProvisionedBody(rawBody). All three arms now live in loaderkit.IsDeployShape (the ONE classifier, data-derived: member children, scalar cross-ref, from:/image: mapping, and the agent_provisioned imageless spelling matching the Deploy gate's box exemption). The host calls pl.IsDeployShape(pn) alone; agentProvisionedBody (node_normalize.go) is deleted. The ResourceChildren seam method + loaderkit impl + plugin-loader delegator die with it (spec docs(changelog): fix 4 stale H1 placeholder CalVers; record status-context audit (no divergence) #122 merged/tagged v0.2026250.2036, sdk docs: revise Liberation — build over use, disposability up front, honesty as spine #239 merged/tagged v0.2026250.2044, plugin-loader chore: bump pkg/arch → #commit-pinned PKGBUILD #7 merged/tagged v0.2026250.2044).

  2. Pins — spec v0.2026250.2036, sdk v0.2026250.2044, plugin-loader/candy/plugin-loader v0.2026250.2044; the three dev worktree replaces are dropped.

How tested

All commands on the final committed tree (real tag pins, no replaces), -count=1:

$ gofmt -l .            # empty
$ go build .  && go vet .   # both exit 0
$ go test . -count=1    # full kernel suite, incl. the fixed-fold + plugin-substrate e2e
ok  github.com/opencharly/charly/charly  116.106s

The fixed-fold suite (the 2026-09-07 RCA lock) verbosely:

$ go test . -run 'TestSubstrateKind' -count=1 -v
=== RUN   TestSubstrateKind_BothShapesByteEquivalent
--- PASS: TestSubstrateKind_BothShapesByteEquivalent (0.02s)
=== RUN   TestSubstrateKind_ImagelessAgentProvisionedPodFoldsToDeploy
--- PASS: TestSubstrateKind_ImagelessAgentProvisionedPodFoldsToDeploy (0.00s)
=== RUN   TestSubstrateKind_PlainImagelessPodStaysTemplate
--- PASS: TestSubstrateKind_PlainImagelessPodStaysTemplate (0.00s)
=== RUN   TestSubstrateKind_ImagelessAgentProvisionedWithSiblingStillFolds
--- PASS: TestSubstrateKind_ImagelessAgentProvisionedWithSiblingStillFolds (0.00s)
PASS
ok  github.com/opencharly/charly/charly 0.512s

FAIL-RED/PASS-GREEN (the fixed fold test guards the consolidated classifier): with the agent_provisioned arm TEMPORARILY stripped from the consolidated IsDeployShape (uncommitted mutation, restored byte-perfect), the fold test FAILS — the RCA bug reproduces through the new architecture:

--- FAIL: TestSubstrateKind_ImagelessAgentProvisionedPodFoldsToDeploy (0.00s)
    substrate_imageless_deploy_test.go:61: imageless agent_provisioned pod DROPPED from acc.Deploy (deploy keys []); pod template map: [agent-live]
FAIL	github.com/opencharly/charly/charly	1.028s

Restored (git diff empty vs HEAD): green (above). The B14(d) sweep: grep -rn 'ResourceChildren' charly/charly --include='*.go' matches only the historical comment (the call and agentProvisionedBody are deleted) — zero live references on this branch.

Rulebook compliance

  • R3 — one deploy-shape classifier (loaderkit.IsDeployShape); the host composite dies, nothing re-implemented.
  • R5 — agentProvisionedBody + the composite are deleted in the same PR that removes their last callers (the consolidated classifier carries both arms).
  • R1 — the 2026-09-07 RCA's lockstep contract (classifier predicate == the Deploy gate's agent_provisioned exemption) is preserved; the fixed-fold tests are unchanged and green.
  • R6 — branch-only, no force-push, no hook bypass. R10 — all gates on the final committed real-pinned tree.

Change classification

  • Change class: code refactor (classifier consolidation + dependency tag pins)
  • Verification gate: gofmt/build/vet + FULL kernel test suite green on the final committed tree; fail-red/pass-green proven with pasted output
  • Attribution tier: fully tested and validated

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)

…er consolidation F1.2/F1.4)

foldSubstrateKind's deploy-vs-template classification was an OR-composite:
pl.IsDeployShape(pn) || len(pl.ResourceChildren(pn)) > 0 || agentProvisionedBody(rawBody).
All arms now live in loaderkit.IsDeployShape (the ONE classifier, data-derived:
member children, scalar cross-ref, from:/image:, and the agent_provisioned
imageless spelling matching the Deploy gate's box exemption). The host calls
pl.IsDeployShape(pn) alone; agentProvisionedBody (node_normalize.go) is deleted.

FAIL-RED/PASS-GREEN proven: with the agent arm stripped from the consolidated
classifier, TestSubstrateKind_ImagelessAgentProvisionedPodFoldsToDeploy fails
(the 2026-09-07 RCA bug reproduces through the NEW architecture); restored,
the fixed-fold suite is green.

Dev-only go.mod worktree replaces for sdk/spec/plugin-loader (real tag pins
land with the merge wave).

Gates: gofmt -l empty, go build ., go vet ., full go test . green
(112.7s, incl. fixed-fold + plugin-substrate e2e).
…0.2044, plugin-loader v0.2026250.2044

Drops the dev worktree replaces; the compiled-in loader's ResourceChildren
delegator removal (plugin-loader #7) and the seam method deletion
(spec #122) now arrive through the real tags.

Gates: gofmt empty, go build ., go vet ., full go test . green
(116.1s) on the real-pinned final tree.
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: d4c9566d50b13d1679f31025c67b3b81a25dd45b

Security screen: PASS — no scope mismatch (diff matches description exactly: composite deletion + tag pins), no secrets/exfiltration, no weakened guardrails, supply-chain pins point to opencharly's own repos (spec/sdk/plugin-loader).

Checklist: All applicable rules PASS or NA.

  • A1/A2/A3 — Body accounts for every diff item (go.mod/go.sum pins, node_normalize.go deletion, provider_kind_invoke.go consolidation, test comment updates, go.work.sum). Change class = code refactor; gate = gofmt/build/vet + full kernel suite on final committed tree, with pasted output. Attribution tier fully tested and validated justified (changed fold path executed; fail-red/pass-green proves it). Assisted-by: footer in exact form.
  • B16 placement — CORRECT: classifier logic moved OUT of core into sdk/loaderkit.IsDeployShape; host delegates via the existing ProjectLoader seam, net core-LOC negative, no new sdk-kit import, no alias file.
  • R3/R5 — one classifier; agentProvisionedBody + host composite deleted in same PR; ResourceChildren live call removed (only historical comments remain, consistent with the body's pasted grep).
  • R1/R10 — zero warnings; full suite + fixed-fold suite green on committed tree; fail-red/pass-green pasted and internally consistent; fixed-fold tests guard the consolidated classifier.
  • R6/R8/R9, ADE, SDD, RDD, B14, B17, B18 — N/A or satisfied (no candies, no CUE/generated files, no target deploy, no concurrency, no ad-hoc workarounds, gofmt clean).
  • B15 — two commits (refactor + pins) collapse to one atomic change; pins are required for the refactor to build, not partial/split work.
  • Comment intake — no comments on the thread.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 7, 2026 20:55
@github-actions
github-actions Bot merged commit c1aed4c into main Sep 7, 2026
3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 7, 2026
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