Skip to content

fix(sync)!: emit the FULL per-pin evidence in the sync PR body (compact rows) - #307

Closed
aitrawog wants to merge 1 commit into
mainfrom
feat/sync-body-evidence-successor
Closed

aitrawog wants to merge 1 commit into
mainfrom
feat/sync-body-evidence-successor

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

Clean successor to #304 (which reached 4/5 BLOCKs from 5 commits by multiple
sessions and must not be pushed again). Reproduced from a FRESH branch off
current origin/main, so the head is ONE commit by ONE session, and the body
below is keyed to it.

Fix the sync-PR body generator so it emits the COMPLETE per-pin evidence
in the body — charly/pr-validator requires it and BLOCKed the live sync PR
opencharly/opencharly#297 on "a pointer to an external Actions artifact is a
promise, not pasted output"
.

The body was truncated by two bounds and pointed at the sync-evidence artifact:

  • scripts/sync-pr-body.sh: SYNC_PATH_LIST_MAX=200 → "first 200 of 402".
  • scripts/sync-pin-evidence.sh: SYNC_EVIDENCE_MAX_BYTES=40000 → "350 of 402 rows shown".

The change (two files, net +137/-82; git diff --stat origin/main...HEAD):

  1. Drop the redundant "Every changed path, named" list entirely and REMOVE
    SYNC_PATH_LIST_MAX.
    The per-pin evidence table names every moved path
    and carries its proof (staged-gitlink vs remote default-branch HEAD),
    so a second list is redundant bytes. No SYNC_PATH_LIST_MAX line remains
    (R5 — removed, not raised).
  2. Compact the per-pin rows: <path> <staged12> <remote12> <flag>.
    The kind (distro-* policy-B vs default-branch) is derivable from the path
    prefix and stated once in a one-line legend; flag is = (equal) or
    ! (mismatch — a real finding, never silently elided).
  3. SYNC_EVIDENCE_MAX_BYTES has a single default, in
    scripts/sync-pin-evidence.sh, raised 40000 → 50000.
    scripts/sync-pr-body.sh
    does not set the variable, so that single default reaches the renderer — it
    is a fallback guard only and does not fire at fleet scale. The stale
    40000 comment in sync-pr-body.sh is rewritten (R5 sweep).
  4. The --self-test asserts the COMPLETE table in the BODY at a 424-pin
    fleet-scale fixture — row count == fleet count and no elision line — not
    only in the artifact.

Measured body size — the comment equals the measurement

Two measurements, pasted as printed. The bounds comment at
scripts/sync-pin-evidence.sh:29 now cites these exact values (21137 B table /
32850 B body at 424 real paths; 39509 B for the synthetic --self-test
fixture) — no ≈45 KB-style rounding.

(a) REAL-FLEET, 424 real umbrella submodule paths, real producer output, every
staged gitlink equal to a local remote's HEAD (the real sync's all-equal worst
case; no network — git ls-remote <local-path> HEAD):

REAL-FLEET MEASUREMENT: paths=424 rendered_body_bytes=32850 table_bytes=21137 evidence_rows_in_body=424 elision_lines=0

(b) The script's own fleet-scale --self-test (424-pin synthetic fixture,
including the umbrella's longest real path layer-check-cross-local-driver-layer):

sync-pr-body self-test: fleet-scale (424-pin) rendered body = 39509 bytes (< 65536)

Both are well under the GITHUB_BODY_MAX=65536 hard guard, which is unchanged and
still ERRORS on overflow.

How tested

Every command below was executed on this head — 76f3085fe845, the single
commit of this PR (git rev-parse HEAD), the SHA being pushed — from the
worktree root.

$ git rev-parse HEAD
76f3085fe8451ab66ff3937247fb0d0f288459a7

$ git log --oneline origin/main..HEAD
76f3085 fix(sync)!: emit the FULL per-pin evidence in the sync PR body (compact rows)

$ git diff --stat origin/main...HEAD
 scripts/sync-pin-evidence.sh |  97 +++++++++++++++++++---------------
 scripts/sync-pr-body.sh      | 122 +++++++++++++++++++++++++++++--------------
 2 files changed, 137 insertions(+), 82 deletions(-)

$ bash scripts/sync-pin-evidence.sh --self-test
sync-pin-evidence: self-test OK (compact <path> <staged> <remote> <flag> rows both ways; coverage both directions; bounded_rows emits all under budget and >=1 + elision notice over budget; staged-gitlink reads the index + falls back to HEAD)

$ bash scripts/sync-pr-body.sh --self-test
sync-pr-body self-test: fleet-scale (424-pin) rendered body = 39509 bytes (< 65536)
sync-pr-body: self-test OK (fleet-scale 424-pin BODY carries the COMPLETE compact evidence table — every path named, no elision — and stays under the 65536 cap; artifact keeps a convenience copy; small input names its paths with no elision; the producer excerpt is verbatim for BOTH the retired per-pin and current summary shapes; over-cap trips the hard guard)

$ bash scripts/sync-dispatcher.sh --self-test
sync-dispatcher: self-test OK (splice writes, steady-state passes, stale fails)

$ node scripts/check-opencode-plugin.mjs
check-opencode-plugin: OK
$ node scripts/check-pr-watch.mjs
check-pr-watch: OK

The sync-pr-body.sh --self-test arm proves the fix where it matters: it renders
a self-contained 424-path fixture whose every staged gitlink equals a local repo's
HEAD, so the rows render exactly as the real fleet's, then asserts the body
carries 424 compact rows, that a middle path and the longest path are both
named in the body, and that the body carries no rows shown elision line.
The old arm asserted only the artifact.

The full charly task verify gate — root-caused and routed to its named batch

The full umbrella gate could NOT be run in this checkout. That is a surfaced
failure, so it is root-caused here and routed to its named owning batch, not
parked:

$ ./charly/bin/charly task verify
charly: error: command "task": load project: .../charly.yml: schema 2026.261.1747 is required (found ""). Run: charly migrate
$ ./charly/bin/charly migrate
charly: error: command "migrate": .../charly.yml: schema "" predates the supported floor 2026.174.1100 and cannot be migrated — the historical migration chain was removed at the 2026.261.1747 baseline reset. Re-author this config against the current schema (a current config carries `version: 2026.261.1747`)

Root cause: commit 803d411 ("chore(schema): drop the retired config
version: stamp (org-wide cutover)"
) removed the version: 2026.261.1747 first
line from the umbrella root charly.yml, while the charly binary built from the
pinned charly/ submodule (adf1b970, v2026.271.1115) still requires that
stamp; charly migrate cannot repair it because schema "" predates the
supported floor. The umbrella task surface (charly task sync/verify/…) is
therefore unusable on a fresh checkout.

Named batch: #306 — "umbrella charly.yml cannot
load: version stamp dropped by 803d411 but the loader requires it"
(filed by the
sync-evidence-full-body session with the same RCA, owner: the charly
schema-versioning surface). This diff touches only the two scripts/sync-*.sh
files, so the tier is analysed on a live system, not fully tested and validated.

Rulebook compliance

  • R0 skills: /charly-internals:git-workflow loaded before any edit (the sync
    is owned by it).
  • R1 RCA: the generator truncation (two bounds + an artifact pointer) is the
    root cause, and the charly.yml load failure is root-caused and routed to
    umbrella charly.yml cannot load: version stamp dropped by 803d411 but the loader requires it #306 — no dismissal.
  • R2 no parking: the generator defect is fixed in its OWN repo/workflow in
    the same change; the config-load failure is named to its owning batch (umbrella charly.yml cannot load: version stamp dropped by 803d411 but the loader requires it #306).
  • R3 no duplication: one implementation — the evidence table IS the
    changed-path list (the duplicate list is removed), and
    SYNC_EVIDENCE_MAX_BYTES has a single default.
  • R4 no workaround: the evidence is rendered in the body, not deferred to an
    artifact; no head/SIGPIPE hazard (rows render to a file, then bound).
  • R5 hard cutover: the truncating list and SYNC_PATH_LIST_MAX are
    removed, not raised; the stale 40000 comment is swept in the same commit.
  • R6 git safety: feat/ branch + PR; no force-push; no push to main.
  • R7 gate: all self-tests + node gates above ran on this head; the full
    charly task verify gate is blocked by umbrella charly.yml cannot load: version stamp dropped by 803d411 but the loader requires it #306 as stated.
  • R8 artifacts: N/A — no generated artifact/OCI label.
  • R9 binary==source: N/A — no binary is built.
  • R10 disposable + coverage: the --self-test asserts the complete table in
    the body at fleet scale; the hard guard still fails loudly over 65536.

Change classification

  • Change class: repo tooling — the two shell scripts that generate the sync PR
    body (scripts/sync-pr-body.sh, scripts/sync-pin-evidence.sh); no
    runtime/bed class.
  • Breaking change + rollback: the sync PR body format changes and
    SYNC_PATH_LIST_MAX is removed; a revert restores the previous generator.
  • Attribution tier: analysed on a live system — the changed runtime path
    (both scripts' --self-test, plus a real-fleet measurement) ran live on this
    head with retained output; the full charly task verify gate is blocked by
    umbrella charly.yml cannot load: version stamp dropped by 803d411 but the loader requires it #306 (named above), so fully tested and validated is not claimed.

Supersedes #304.

Agent: sync-evidence-successor · session ses_f141f2e80ffel5akiYQk8IYMki
Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)

…ct rows)

The sync-PR body generator truncated the evidence: scripts/sync-pr-body.sh
bounded the path list (SYNC_PATH_LIST_MAX=200 -> 'first 200 of 402') and
scripts/sync-pin-evidence.sh bounded the per-pin rows
(SYNC_EVIDENCE_MAX_BYTES=40000 -> '350 of 402 rows shown'), pointing the
validator at the sync-evidence run artifact. A pointer is a promise, not
pasted output, so charly/pr-validator BLOCKed the live sync PR #297.

- Remove the redundant 'Every changed path, named' list and SYNC_PATH_LIST_MAX
  entirely; the per-pin evidence table already names every moved path AND
  carries its proof.
- Compact each per-pin row to '  <path>  <staged12>  <remote12>  <flag>' with a
  one-line legend, so the COMPLETE table fits the body with headroom at fleet
  scale.
- SYNC_EVIDENCE_MAX_BYTES keeps a single default (50000) in
  scripts/sync-pin-evidence.sh as a fallback guard; sync-pr-body.sh no longer
  sets it. The stale 40000 comment is swept.
- The --self-test asserts the COMPLETE table IN the body at a 424-pin
  fleet-scale fixture (row count == fleet, no elision line).

Measured (424 real umbrella paths, real producer output): body = 32850 B,
table = 21137 B, 424 rows, 0 elisions. Synthetic --self-test fixture: 39509 B.

Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 76f3085fe8451ab66ff3937247fb0d0f288459a7 (branch: feat/sync-body-evidence-successor)

Security screen: PASS — no secrets/egress/obfuscation, no new deps or pins, no scope mismatch (diff matches the body exactly), and the raised SYNC_EVIDENCE_MAX_BYTES default is a per-section emission bound, not one of the enumerated security gates; the GITHUB_BODY_MAX=65536 hard guard is unchanged and still errors on overflow.

Checklist: All applicable rules PASS or NA.

  • A1/A3 — body is complete, ends with the Assisted-by: trailer; tier analysed on a live system is honest (self-tests ran live; full charly task verify blocked and not overclaimed).
  • A2/B12 — self-test asserts the complete body table (424 rows, no rows shown) and would fail on the old code; over-cap guard retained.
  • B5/B6 — charly.yml load failure is root-caused (commit 803d411) and routed to the named batch umbrella charly.yml cannot load: version stamp dropped by 803d411 but the loader requires it #306, not dismissed.
  • B7/B10/B15 — duplicate path list and SYNC_PATH_LIST_MAX removed, stale 40000 comment swept, one atomic commit.
  • B13/B16/B17 — no candies/CUE/generated files, no core/sdk/candy placement, no autonomous destroy: NA.
  • Comments: none in the thread to disposition.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@aitrawog

Copy link
Copy Markdown
Contributor Author

RESOLVED

RESOLVED — superseded by the merged #304.

This successor was opened to carry #304's reviewed-good content forward because #304 was at 4/5 BLOCKs. Before this PR could validate, a sibling session (quick-nebula, hand-off) fixed #304's body (the three blocks on head 1f3454b8 were body-only: anchor the evidence to the PR head, drop the banned "unrelated" framing, make the bounds comment equal the measured size) and re-ran the gate; charly/pr-validator returned PASS on 1f3454b8 at 06:52:00Z, and auto-merge landed it as 1db7c69 (CHANGELOG 2026.272.0652).

So the content this branch reproduces is already in main; the only delta here is a cosmetic rewording of the bounds comment, which does not justify a second PR (R3). Closing as redundant — the work landed in #304, not here. No push to this branch further.

Agent: sync-evidence-successor · session ses_f141f2e80ffel5akiYQk8IYMki
Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)

Agent: sync-evidence-successor · session ses_f141f2e80ffel5akiYQk8IYMki
Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)

@aitrawog

Copy link
Copy Markdown
Contributor Author

Closed as redundant — the generator fix already landed in main via #304 (merge commit 1db7c69, PASS on head 1f3454b at 06:52:00Z). This branch reproduced exactly that content; the only delta was a cosmetic comment rewording. See the RESOLVED comment above.

@aitrawog aitrawog closed this Sep 29, 2026
auto-merge was automatically disabled September 29, 2026 06:59

Pull request was closed

@aitrawog
aitrawog deleted the feat/sync-body-evidence-successor branch September 29, 2026 07:01
github-actions Bot pushed a commit that referenced this pull request Nov 13, 2026
… spec; re-home the pod census row and citation (#1002)

The five pins 2.1 unit 3 (pod) landed were behind, and the two design
ledgers described the pre-move tree. This advances exactly the five pins
the currency question named and reconciles the census, the citation, the
rows the relocation touched, and one version-sentinel prose surface:

- charly            9a988fe7 -> 85149793 (v2026.317.0814, PR #1130)
- plugin-check      b56b37e3 -> 7e9dbd2d (v2026.317.0744, PR #144)
- plugin-substrate  1e97151e -> 25586c76 (v2026.317.0614, PR #32)
- sdk               24279099 -> fe1bd998 (v0.2026317.712, PR #504)
- spec              64f85a36 -> 9cfcc117 (v0.2026317.703, PR #307)

`charly task sync` moved exactly those five and nothing else (it reports
5 pin(s) moved), and `charly task pins --param MODE=currency` then reads
0 of 409 pin(s) NOT current.

spec#307 deleted #Pod/#PodValue and plugin-substrate's CUE module gained
them, so the census row for `#PodValue: (#Pod | schema.#DeployValue)` is
RELOCATED, not lost: it re-homes from spec/schema/node.cue to
plugin-substrate/candy/plugin-substrate/schema/pod.cue with the same rule
and the same count. The total is unchanged (357 known violations, every
per-rule count identical), so this is a relocation, not new debt. The one
line citation that showed the kind body (spec/schema/pod.cue:10-19) is
re-anchored onto the plugin copy as the NAME citations #Pod and #PodValue
— the full definition set that moved — and its baseline row is lowered
with it, so `design/cite-baseline.tsv` keeps only citations that hold.

TODO.md carried three findings on `main` before this change, in two gate
legs, and it is the only prose this wave touches.

`charly task verify` was red on the literal-pathspec leg
(`scripts/check-guidance-pathspec.mjs`, #751): the
unit-2 lesson's sweep names its path argument as `git ls-tree origin/main
-- "$p"`, which git may REINTERPRET, instead of `":(literal)$p"`. Fixed to
the literal form; the paste below it is unchanged, proven by running both
forms over every `plugin-*` path at origin/main (0 differ, and 0 of them
carry a glob metacharacter).

Leg 13 of the pre-commit gate (`scripts/check-cited-plugin-task-version.mjs`)
pairs every line naming `plugin-task` with every version literal on that
line, so unit 2's `sdk` row — which names the plugin in its prose and the
sdk module tag in its version column — and its lesson sentence, which
quoted the retired literal, both read as live plugin-task version claims.
Measured on the pristine `origin/main` worktree: the same two findings, on
either charly pin. Both lines now state what they mean, and the retired
literal stays once in `CHANGELOG/2026.317.0537.md`, where history is
immutable. The control's class — a predicate keyed to a module MENTION
rather than the citation FORM — is filed as #1001.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

Co-authored-by: aitrawog <[email protected]>
github-actions Bot pushed a commit that referenced this pull request Nov 13, 2026
…gories and the cumulative invariant (#1003)

Unit 3 (pod) landed as FIVE legs, not one as the tracker said: plugin-substrate#32,
spec#307, sdk#504, plugin-check#144 and charly#1130, then the umbrella pin wave
#1002. The block records the measured effects at the pins that wave set
(spec.KindValueDefs 9 -> 8, #<Word>Value 10 -> 9, 11 kind bodies left over this
file's 14-name list), the one-row census relocation (node.cue -> the plugin's
pod.cue, differing only by the schema qualifier), the one re-anchored citation
(a line citation -> two NAME citations on the plugin's copy), the THIRD keeper
category (#PodSidecar stays because the contract's own #ResolvedPod cites it,
after unit 1's spec-generator keeper and unit 2's sibling-plugin keeper), the
reason #307's pushed body says 13 -> 12 over a 15-name list (#Image is
#CandyValue's image arm, not a kind body), the corrected CUMULATIVE invariant
(309 = 250 pod + 47 task + 12 pipeline, 2004 - 309 = 1695), the fact that
TestKindValueDefs_ComposedEqualsBase needs no edit by construction, and the two
control defects filed as #1001 and #751.

2.1 stays open: eight kinds remain, in opencharly/spec#304's measured order.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (documentation reviewed)

Co-authored-by: aitrawog <[email protected]>
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