Skip to content

fix: escape backticks in umbrella-gates.ts template literal - #3

Merged
github-actions[bot] merged 3 commits into
mainfrom
feat/fix-umbrella-gates-parse-error
Aug 22, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
feat/fix-umbrella-gates-parse-error

Conversation

@atrawog

@atrawog atrawog commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes a ParseError: Missing semicolon in .pi/extensions/umbrella-gates.ts caused by unescaped backticks inside the buildRulesBlock() template literal. The backticks around Markdown code spans (\`CHANGELOG/<calver>.md\` and the Assisted-by example) prematurely terminated the template string, making the extension unloadable.

Also adds .pi/npm/ to .gitignore so that pi project-local package installs are ignored at the root level, matching charly/.gitignore.

Diff items: .pi/extensions/umbrella-gates.ts, .gitignore, CHANGELOG/2026.234.1041.md.

How tested

1. TypeScript syntax check — changed path static analysis

$ npm install typescript --save-dev --no-audit --no-fund
added 2 packages in 787ms

$ ./node_modules/.bin/tsc --noEmit .pi/extensions/umbrella-gates.ts
[no output — zero parse errors]

Previously this produced TS1005: ';' expected. at line 99.

2. Live extension execution — changed path ran live on committed tree

$ cd /home/atrawog/Sync/Atrapub/coder/pi/opencharly && pi "list available tools"

Here are the tools available in this session:

**File & code operations**
- `read` — read files (text, images), with offset/limit for large files
- `write` — create/overwrite files
- `edit` — precise text replacement edits
- `bash` — execute shell commands in the current working directory

**Skills & knowledge (R0)**
- `umbrella_load_skills` — load SKILL.md docs matching the dispatcher table in AGENTS.md

**MCP gateway**
- `mcp` — server status, tool search/describe/auth, single MCP tool calls
- `mcpScript` — batch/chain multiple MCP calls in one JavaScript request

**Subagents & orchestration**
- `subagent` — delegate work (single child, workflowScript for parallel/multi-step)
- `subagent_wait` — block until background work finishes
- `subagent_supervisor` — answer child subagent requests

The umbrella_load_skills custom tool (registered by the extension) is present and functional, proving the extension loads and executes. Previously the same command failed with:

Error: Failed to load extension "…/.pi/extensions/umbrella-gates.ts":
Failed to load extension: ParseError: Missing semicolon. …:99:26

3. Harness parity gate

$ task harness
 check-harness-parity: OK — 6 shared harness files identical to charly/

4. Pinning gate

$ task verify
 verify-pins: OK — 22 submodules, policy B holds

5. git status — committed tree verification

$ git status --short
[no output — empty, working tree clean after commit]

6. RCA of previous validator review rounds

Earlier charly/pr-validator runs on this PR (#32568270134, #32568270550) failed because:

  • A3: Attribution tier claimed fully tested and validated without live execution proof of the changed path → fixed by downgrading to analysed on a live system and adding the live pi execution proof above.
  • A1: tsc output and git status were parenthetical assertions, not pasted output → fixed by pasting verbatim output for every step.
  • A1: CHANGELOG diff item was not accounted for in the Summary → fixed by listing all three diff items explicitly.
  • A2/R10: No disposable target named → addressed below (R10 is N/A for the umbrella, which has no disposable: true beds).

The current body addresses every issue raised in those review rounds. The red validate / validate checks from those superseded runs remain on the PR because GitHub does not clear historical check runs; they are not the current state.

Rulebook compliance

Rule Status Evidence
R1 (RCA anomalies) ✅ Root cause identified: unescaped backticks in template literal; RCA of validator failures included above
R3 (no duplication) ✅ Fix uses same escape pattern already present elsewhere in the codebase
R4 (no workarounds) ✅ Real fix (escape characters), not a workaround
R5 (delete legacy) ✅ N/A — no legacy path removed
R6 (git safety) ✅ feat/ branch, no force-push, no direct-main push
R7 (prove the gate) ✅ task verify + task harness both green on final committed tree
R10 (fresh disposable proof) N/A — umbrella has no disposable beds The umbrella is a meta-repo (gitlink pinning, harness config); it has no charly check beds, no container images, and no disposable: true targets. R10's fresh-rebuild requirement does not apply. The changed path was verified live via pi execution on the committed tree.

Change Classification

  • Change class: fix
  • Verification gate: task verify (CI) + task harness (parity check) + live pi extension execution
  • Attribution tier: analysed on a live system

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)

atrawog and others added 3 commits August 22, 2026 12:39
Fixes ParseError: Missing semicolon on line 99 caused by unescaped
backticks inside the buildRulesBlock() template literal that
prematurely terminated the template string.

Also adds .pi/npm/ to .gitignore for parity with charly/.
@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 10bf9c0b48fb (base ae3ea18dff50)

Change class: code/config fix — .pi/extensions/umbrella-gates.ts (backtick escaping), .gitignore, CHANGELOG/2026.234.1041.md.

Blocks

  1. A3 — attribution tier inflated. The body claims fully tested and validated, but the changed code path (the escaped template literal in .pi/extensions/umbrella-gates.ts executing when the extension loads / buildRulesBlock() runs) is not shown to have executed. The pasted proof is tsc --noEmit (a parse/type check, not execution), task harness (file parity), and task verify (pin check) — none execute the changed code. The validate CI gate that would load the extension is in_progress, not green, and is not cited in the body. Per A3, a change whose changed branch never ran live is at most analysed on a live system. Downgrade the tier to match the proof, or paste output of the extension loading/running against the committed tree.

  2. B12/R10 — fresh-rebuild disposable proof missing. The compliance table claims R10 ✅ with "Verified from committed tree, not edited state", which is not R10's requirement (a disposable: true target, a fresh rebuild, pasted output for each changed piece). Either R10 is N/A for this change class — say N/A — <reason> — or supply the required proof.

  3. A1 — incomplete body. (a) The Summary accounts for umbrella-gates.ts and .gitignore but not the new CHANGELOG/2026.234.1041.md — a diff item missing from the accounting is a defect. (b) The tsc and git status verification steps are asserted in parentheses rather than pasted output ("pasted output (not a promise)").

Non-blocking flag

  • B19 — placeholder CHANGELOG. CHANGELOG/2026.234.1041.md H1 is # CHANGELOG placeholder — will be finalized to merge-time CalVer by pr-validator, not # 2026.234.1041 — <title>. Needs the rename before merge; the auto-merge workflow handles placeholders, so this alone does not block.

Verdict: BLOCK


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 10bf9c0b48fb1e939bd7c6a9fe37c92973b7440c

Change class: code/config — TypeScript pi-extension fix (.pi/extensions/umbrella-gates.ts), .gitignore addition, CHANGELOG entry.

Security screen: PASS — diff matches the description exactly (no scope mismatch), no secrets/network/guardrail changes, no embedded directives. The backtick-escape fix is internally consistent with the claimed TS1005 at line 99 (raw backticks inside the buildRulesBlock() template literal would terminate it).

Blocks

  1. A3 — inflated attribution tier. The body claims fully tested and validated, but the changed code path (the fixed extension loading / buildRulesBlock() executing) never ran live per the pasted evidence: tsc --noEmit is a static syntax check, task harness is a file-parity comparison, task verify checks submodule pins — none execute the changed code. Per A3 the ceiling for a change whose changed branch never ran live is at most analysed on a live system. Downgrade the tier or paste execution proof of the changed path.

  2. A1 — incomplete How tested. For a code change the block must name the disposable target, the fresh-rebuild confirmation, and whether the CHANGED code path executed live — none are given. The tsc step's "output" is a parenthetical comment (# No parse errors (previously: TS1005…)), not pasted output; the git status claim is asserted, not pasted. The summary also does not account for the CHANGELOG/2026.234.1041.md diff item.

  3. A2/R10 — no fresh-rebuild bed run. This is a runtime/code change; the gate requires a FRESH-rebuild bed run with pasted output. The evidence is a syntax check only (tsc --noEmit), which does not execute the changed code — the forbidden "rebuild WITHOUT the changed runner executing" pattern. The R10 row ("Verified from committed tree, not edited state") names no disposable: true target, no fresh rebuild, and no per-piece output.

Non-blocking flag: CHANGELOG/2026.234.1041.md H1 is still the placeholder text (# CHANGELOG placeholder — …), not # 2026.234.1041 — <title>; per B19 this needs the rename at merge (auto-merge renames placeholders, so not a block on its own).

Verdict: BLOCK


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 10bf9c0b48fb (branch: fix/escape-backticks-umbrella-gates)

Change class: code/config — .pi/extensions/umbrella-gates.ts backtick-escape fix, .gitignore addition, CHANGELOG entry.

Security screen: PASS — diff matches the described intent (backtick escaping, gitignore, changelog); no secrets, network, guardrail, or scope-mismatch findings; no embedded directives.

Blocks

  1. A1/R1 — body↔diff contradiction on the CHANGELOG filename. The body's Summary states "The CHANGELOG diff item is CHANGELOG/2026.234.1239.md (placeholder…)", but the CURRENT diff contains CHANGELOG/2026.234.1041.md. The body's accounting of the diff is factually wrong (it references the pre-finalization placeholder name). Per R1 reality-over-text, the body must be corrected to name the actual diff item CHANGELOG/2026.234.1041.md.

  2. CI contradiction — validate / validate gate is FAILING on the current head. get_ci_status shows two validate / validate runs with conclusion failure on head 10bf9c0b48fb. The body claims the extension loads and runs live (pi "list available tools" shows umbrella_load_skills), yet the CI validate gate on the same head is red and is never mentioned in the body. This is a direct contradiction between the body's live-execution claim and the live CI state. The body must RCA the validate failure (R1) and reconcile it with the claimed live success — a red gate on the head cannot be left unaddressed.

  3. A1/A2 — How tested does not name a disposable target or fresh-rebuild confirmation. For a runtime/code change the gate requires naming the disposable target and confirming the changed code path executed against a fresh rebuild. The live-execution step runs on the author's local machine (/home/atrawog/…), not a disposable: true target, and no fresh-rebuild confirmation is given. Supply the disposable target and rebuild confirmation, or state N/A — <reason> for the R10 disposable requirement.

Non-blocking flag

  • B19 — placeholder CHANGELOG. CHANGELOG/2026.234.1041.md H1 is # CHANGELOG placeholder — …, not # 2026.234.1041 — <title>. Auto-merge renames placeholders, so this alone does not block.

Comment dispositions

  • github-actions[bot] #5379837868 and #5379841912 — stale-superseded on the A3 tier claim: both assert the body claims fully tested and validated, but the CURRENT body claims analysed on a live system (downgraded, and justified by the pasted live-execution proof). Their A1/A2/R10 concerns are re-derived above and partially survive (CHANGELOG accounting, disposable target).

Verdict: BLOCK


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 10bf9c0b48fb (branch: fix/escape-backticks-umbrella-gates)

Security screen: PASS — diff matches the described intent exactly (backtick escapes in .pi/extensions/umbrella-gates.ts, .pi/npm/ gitignore, CHANGELOG); no secrets, network, guardrail, or scope-mismatch findings; no embedded directives aimed at the validator.

Checklist: All applicable rules PASS or NA. Placement: CORRECT (fix stays inside the existing umbrella extension; no layer moves, no alias/core-machinery changes). Comment intake: comments #5379837868/#5379841912/#5379857829 are stale/superseded — their A3 tier, A1 accounting, body↔diff CHANGELOG-name, and disposable-target claims are all resolved by the current body/diff (tier downgraded to analysed on a live system with pasted live extension execution, diff items accounted, name corrected to 2026.234.1041). Non-blocking flag carried: CHANGELOG/2026.234.1041.md H1 is still the placeholder text; auto-merge renames placeholders before merge, so it does not gate.

Verdict: PASS


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) August 22, 2026 11:03
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 10bf9c0b48fb (branch: fix/escape-backticks-umbrella-gates)

Security screen: PASS — diff matches the stated intent exactly (.ts backtick-escape fix, .pi/npm/ gitignore, CHANGELOG); no secrets, exfiltration, scope mismatch, guardrail weakening, or embedded directives. The escape change only repairs template-literal parsing inside the existing extension — it alters no gate rules text.

Checklist: All applicable rules PASS or NA. Placement: CORRECT (fix confined to the existing extension; no layer moves, no alias/core machinery). R10 is legitimately N/A with reason (meta-repo; no disposable: true beds) and the fixed path demonstrably executed live: the pasted pi "list available tools" output shows the umbrella_load_skills tool registered, which is impossible if the extension still failed to parse at line 99. A3 tier analysed on a live system is at-or-below the ceiling — no inflation. CI cross-check: verify and wait-for-ci green on the head; the red validate run is addressed in the body (historical/superseded, with a fresh validate currently in_progress) — not a surviving contradiction.

Comment intake: #5379837868 / #5379841912 / #5379857829 — stale-superseded (their A3-tier, CHANGELOG-name, accounting, and disposable-target claims are all resolved by the CURRENT body/diff, re-derived and confirmed above); #5379885820 — verified-non-blocking (independent re-derivation agrees). Non-blocking flag carried: CHANGELOG/2026.234.1041.md H1 is still the placeholder; per B19 the auto-merge renames it before merge.

Verdict: PASS


openrouter/deepseek/deepseek-v4-flash-0731 — pi-review-action.

View action run

@github-actions
github-actions Bot merged commit 3e8f03f into main Aug 22, 2026
6 of 8 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Aug 22, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 22, 2026
…aky cron (#8)

RCA: tag delivery was driven entirely by GitHub's best-effort cron
(measured 21-44 min gaps vs the configured 15; PR #3's tag 4+ h late;
PR #7's tag still missing 30 min after merge). The pull_request:closed
trigger added in PR #4 never fired a single run (0 runs across 7 merges,
API-confirmed), and the earlier workflow_run design died 15x in a row
with startup_failure. The one trigger that demonstrably fires at merge
time is the push to main that IS the squash-merge (verify.yml push runs
arrive ~20s after each merge). Re-trigger on push: branches: [main];
the org reusable workflow is idempotent, so the CHANGELOG bot push
re-trigger is a cheap no-op sweep.
github-actions Bot pushed a commit that referenced this pull request Aug 22, 2026
…ge commits are run-suppressed) (#9)

* ci: tag-on-merge via push-to-main instead of dead closed trigger + flaky cron

RCA: tag delivery was driven entirely by GitHub's best-effort cron
(measured 21-44 min gaps vs the configured 15; PR #3's tag 4+ h late;
PR #7's tag still missing 30 min after merge). The pull_request:closed
trigger added in PR #4 never fired a single run (0 runs across 7 merges,
API-confirmed), and the earlier workflow_run design died 15x in a row
with startup_failure. The one trigger that demonstrably fires at merge
time is the push to main that IS the squash-merge (verify.yml push runs
arrive ~20s after each merge). Re-trigger on push: branches: [main];
the org reusable workflow is idempotent, so the CHANGELOG bot push
re-trigger is a cheap no-op sweep.

* ci: tag-on-merge on pr-validator completion + push (corrected RCA)

The push-only trigger shipped in #8 was based on a false premise: the
verify.yml 'push' runs cited were changelog-bot commits, not merge pushes.
Measured reality: native-auto-merge merges (actor app/github-actions) fire
their webhook events (visible in the public event stream) but GitHub Actions
creates ZERO workflow runs for them — platform-level run suppression. The
pull_request:closed trigger never fired either (0 runs in history). The only
trigger whose event delivery is proven is workflow_run on the pr-validator
run — the run that arms the auto-merge. This fires on its completion, waits
(bounded) for the squash merge to land, then runs the org's idempotent
tag-on-merge sweep. push remains as a secondary trigger for human/bot pushes
(which do create runs). No cron: measured delivery was 21-44 min late.
github-actions Bot pushed a commit that referenced this pull request Nov 21, 2026
* chore(pins): advance 15 pins to their merged, tagged tips

`charly task sync` over the whole umbrella, after the owned-skill carrier chain and this
session's consumer fixes landed. Every pin is a leaf judged against its remote default
branch; the moved set is exactly what the currency report listed as NOT CURRENT:

  charly              199cd01  (v2026.325.1102 — the release carrying the owned-skill chain)
  spec                961a32a  sdk                    fe472f3
  plugin-box          c27f6e1  plugin-build           3421574
  plugin-cstream      31895cd  plugin-harness-kind     a66de82
  layer-kde-shell     1aa1ba4  layer-openclaw          9fcdbe5
  layer-whisper       73808b9  marketplace             ad6074a
  pod-cdi             7459ea8  pod-kde-vnc             2a2f526
  pod-openwebui       ce0ff42  pod-strata              90f1b6b

The wave also re-derived the harness skill bindings from the bumped corpus (its second
step), so the DSH farm, reasonix.toml and .claude/settings.json are projections of the
corpus this same commit pins.

Why one wave: `task sync` advances EVERY declared pin by design (Part II #3), and the pins
it moved are the ones today's landed chain touched. The gitlinks it records are the merged
squash commits' successors, which is what the served-line rule expects.

Agent: `owui-full-stack` · Claude Code session `00d99c7c-dad9-4d14-be0e-7be094b099e9`
Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

* chore(design): re-anchor the kind:skill citation at the advanced spec pin

The wave advances `spec` to the commit carrying the owned-skill chain, which rewrote the
comment block in `spec/schema/skill.cue`: at the new pin, lines 33-38 hold the `owner` and
`family` notes and the `#Skill` node starts at 42. The ledger row was anchored to that
line range, so the DESIGN gate correctly refused the push (R11 ratchet).

The row now cites the construct by name — `spec/schema/skill.cue:#Skill` — which is what
the control recommends for a construct a schema edit can move, and
`design/cite-baseline.tsv` is regenerated with `--emit-baseline` (never by hand):

  design-cite: every citation resolves at its pin; 150 line citation(s) still hold the
  construct and the bytes they were affirmed against

Agent: `owui-full-stack` · Claude Code session `00d99c7c-dad9-4d14-be0e-7be094b099e9`
Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

* chore(design): re-anchor the plugin-cstream union census at the advanced pin

The wave advances `plugin-cstream` to the release whose control-surface schema grows
`method` from three alternatives to eight (type/key/move/click/scroll added). The dpat census
recorded the old text, so the §25 control failed the push.

The COUNT is unchanged — 1 union on that path before and after, the same single D-PAT-3
violation — so this re-anchors the recorded text and does not raise the debt:

  design-dpat: no new violation, and the census matches the tree

Agent: `owui-full-stack` · Claude Code session `00d99c7c-dad9-4d14-be0e-7be094b099e9`
Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
github-actions Bot pushed a commit that referenced this pull request Nov 28, 2026
…#1357)

* chore(umbrella)!: track upstream main and fast-forward the submodules

Delete the pin-tag control (DESIGN A.12, `scripts/design-pintag.sh`, its census)
and the tag vocabulary around the pin advance. A pin is now the tip of the
branch its `.gitmodules` entry declares, as of the last fast-forward:

- `charly task ff` (verb mode `ff`) fast-forwards every declared path, refusing
  a move that is not a fast-forward, and stages the gitlinks;
- `charly task verify` FAILS on a pin that is behind that tip (and on a
  `blocked-by` that names a producer leg); the one reported non-failure is a pin
  whose ancestry cannot be judged;
- `sync-pin-evidence.sh` becomes `ff-evidence.sh`, and every gate, hook and
  skill reference follows.

The rulebook (Part II #3), the README, the dispatcher row and the git-workflow
skill's tracking-contract reference are rewritten to match.

Relates to #1347

Agent: hidden-moon-ses_ddfedece3ffegiVhkXvGabTaFh
Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)

* chore(pins)!: the fast-forward wave — 328 pins current, citations re-keyed

The umbrella's wave under the new contract: 17 gitlinks advanced (charly, the
five `distro-*` edges — two moved — and 13 leaves), and the three prose
citations of `plugin-task` re-keyed to the version the new pin compiles
(`candy/plugin-task/verbs.go:978` for `ancestryClass`, `:819` for the step
message).

`charly task verify`: 0 of 328 pin(s) NOT current [328 cur].

Relates to #1347

Agent: hidden-moon-ses_ddfedece3ffegiVhkXvGabTaFh
Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

* refactor(ff): complete the rename — the body builder, the env contract, the prose

The validator's R5 round: `scripts/sync-pr-body.sh` and its `SYNC_*` env
contract still named the retired operation after `sync` became `ff`.

- `scripts/sync-pr-body.sh` → `scripts/ff-body.sh`, with every reference in
  `charly.yml`, `scripts/self-test.sh`, `scripts/lib/pr-body-cap`,
  `check-pr-body-cap.mjs`, `check-pr-body-diff.mjs`,
  `check-cited-plugin-task-version.mjs`, `check-pin-verb-scope.mjs` and
  `ff-evidence.sh`.
- `SYNC_*` → `FF_*` throughout the two scripts (`FF_AGENT`, `FF_ASSISTED_BY`,
  `FF_BASE`, `FF_EVIDENCE_OUT`, `FF_EVIDENCE_MAX_BYTES`, `FF_EVIDENCE_TYPE_OUT`).
- "the sync" → "the wave" in the wave-PR prose; the unrelated uses (the fork
  sync, the label sync, `tracker_sync`) were kept as they are.
- `.agents/skills/agents/SKILL.md`: the quoted failure form "X not found — sync
  the pin" is no longer a product string (verified absent from every
  opencharly module in the module cache), so it now names the condition.

Verified: both scripts' self-tests, `check-pr-body-cap`, `check-pin-verb-scope`
(29 arms), `check-retired-claims` and the umbrella `self-test.sh` all pass.

Relates to #1347

Agent: hidden-moon-ses_ddfedece3ffegiVhkXvGabTaFh
Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

* fix(pins): follow charly's advance, disambiguate the label-sync prose

The strict gate failed on `charly: behind` after main's latest landing. The
wave advanced it (1 pin moved), the binary was rebuilt from the new pin
(`2026.332.1152`), and `verify` is `0 of 328` not current again.

The one surviving `the sync` in the tree was the LABEL sync in
`issue-labels.md`; it now says "the label sync", so the rename sweep is
genuinely clean under the broader pattern.

Relates to #1347

Agent: hidden-moon-ses_ddfedece3ffegiVhkXvGabTaFh
Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
aitrawog added a commit that referenced this pull request Nov 28, 2026
…e arm

The raced paragraph this cutover adds still emitted the RETIRED verb name: the
base's hard cutover renamed it (#1357), the merge carried my paragraph across the
rename untouched, and my sweep looked only at the three code comments I had
authored -- not at the SENTENCE the generator emits. The body then pasted that
sentence with the new name, so its evidence contradicted the committed script
(#1360, block 1).

The echo now emits `charly task ff`, and the self-test pins the VERB, not only
the rule it cites: the earlier arms asserted `Part II #3` and stayed green while
the sentence named a command that no longer exists.

Swept: a grep for the retired spelling across scripts/ returns nothing.

Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (fully tested and validated)
github-actions Bot pushed a commit that referenced this pull request Nov 28, 2026
…y can prove (#1360)

* fix(design): resolve a construct-only citation, and refuse a construct carrying a range

design-cite recognised only `:#Name`, `:N` and `:N-M`. A construct citation
(`pod_cmd.go:CpCmd.Run`) matched no subject, fell through to the bare-path pass,
and was judged as "the file exists" — so the form the capability ledger is
migrating to was checked by nothing, and a hybrid left behind by a
find-and-replace reached the org validator instead of failing here
(#1348, block 2; #1349).

The scanner now also matches a bare symbol and `Receiver.Method`, and the judge
resolves the DECLARATION at the pin: a CUE `#Name`/`_name` header, a Go
`func (r *Receiver) Method(`, or a top-level func/type/var/const. A construct the
pin does not declare is a failure naming the row; a construct that cannot be
located because the language has no construct model is a failure that says so.
A construct carrying a line range is refused: it names two subjects at once.

`.md` is deliberately NOT a construct surface: `DESIGN.md:D-CLI-1` and
`DESIGN.md:§A.13` are how every ledger row names its requirement, and an ungated
arm turned 241 of them into failures (measured). The self-test pins both halves.

MEASURED on this tree (pin plugin-pod c4ddfd0cc353):
  real ledger                                0 findings
  pod_cmd.go:NoSuchConstructXYZ              1 finding  (was 0)
  pod_cmd.go:CpCmd.Run                       0 findings
  pod_cmd.go:CpCmd.Run-485 (the hybrid)      1 finding

Closes #1349

Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (fully tested and validated)

* fix(sync): derive the .pi marketplace pin from the corpus, through the gate's own library

`charly task sync` re-derived the DSH farm and .claude/settings.json from the
corpus it had just advanced, while check-harness-config judged THREE surfaces
that name that corpus — the third being .pi/settings.json's marketplace package
pin. No step derived it, so every wave reddened the gate after its own
derivation step had reported success, and the pin was corrected by hand twice in
one cutover (#1348; #1344).

The tag reading is now ONE library (scripts/lib/corpus-tag.mjs) with two
consumers: check-harness-config JUDGES with it, sync-skill-bindings WRITES from
it, so the gate and the derivation cannot drift apart again. `--only pi` is a
scope like the others, and every state where the pin cannot be derived — no
.pi/settings.json, no marketplace package entry, no corpus checkout (a session
worktree carries an EMPTY marketplace/, Part II rule 2) — SKIPS VISIBLY by name.

`--check` does NOT write. The first version of this function wrote on the check
path, which would have repaired the very staleness the wave is meant to surface;
an arm now asserts the file is byte-identical after a failed check.

MEASURED on this tree, in the order a wave runs:
  pin moved back to v2026.331.2137   --check exit 1, STALE named, file untouched
  the same staleness                  check-harness-config exit 1, its own message
  the derive step (write mode)        rewrites the pin to the corpus tag
  both                                check-harness-config OK / bindings clean

Closes #1344

Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (fully tested and validated)

* fix(sync): derive the .pi marketplace pin from the corpus, through the gate's own library

`charly task sync` re-derived the DSH farm and .claude/settings.json from the
corpus it had just advanced, while check-harness-config judged THREE surfaces
that name that corpus — the third being .pi/settings.json's marketplace package
pin. No step derived it, so every wave reddened the gate after its own
derivation step had reported success, and the pin was corrected by hand twice in
one cutover (#1348; #1344).

The tag reading is now ONE library (scripts/lib/corpus-tag.mjs) with two
consumers: check-harness-config JUDGES with it, sync-skill-bindings WRITES from
it, so the gate and the derivation cannot drift apart again. `--only pi` is a
scope like the others, and every state where the pin cannot be derived — no
.pi/settings.json, no marketplace package entry, no corpus checkout (a session
worktree carries an EMPTY marketplace/, Part II rule 2) — SKIPS VISIBLY by name.

`--check` does NOT write. The first version of this function wrote on the check
path, which would have repaired the very staleness the wave is meant to surface;
an arm now asserts the file is byte-identical after a failed check.

MEASURED on this tree, in the order a wave runs:
  pin moved back to v2026.331.2137   --check exit 1, STALE named, file untouched
  the same staleness                  check-harness-config exit 1, its own message
  the derive step (write mode)        rewrites the pin to the corpus tag
  both                                check-harness-config OK / bindings clean

Closes #1344

Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (fully tested and validated)

* refactor(design): one judge_construct helper serves both citation loops

The construct arm was written twice — once in the loop that judges a citation
into a PINNED module, once in the loop that judges a citation into this
repository's own tree — and the two had already diverged: the first read the
working tree and said "does not declare X", the second read the pinned cache and
said "does not declare X at the pin <sha>". A citation could therefore get two
verdicts depending on which loop reached it, which is precisely the defect the
arm exists to remove (#1356 blocks 1 and 2).

`judge_construct` now owns the language gate, the hybrid refusal, the resolution
and the message, and each caller supplies the file it resolved plus the phrase
that names it: `at the pin <sha>` for a pinned module, `in this tree` for a file
of this repository (which cannot drift under a third party's commit — the split
the LINE arm already documents). Its variables are `local`.

The body's section 1 is also corrected: it paraphrased three runs as "0 findings",
which is not the script's output. It now pastes all four runs verbatim, including
the row injection that produced each one.

Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (fully tested and validated)

* refactor(design): one owner for the language dispatch, and a comment that matches it

`judge_construct` pre-filtered the cited path to `.cue|*.go` and emitted the
unmodelled-language failure itself, so `declares_construct`'s `return 2` could
never execute and the language decision lived in two places — the second one
dead. Its doc block also promised a fail-loud the function did not perform: the
message was rendered by the caller (#1356, blocks 1 and 2).

`declares_construct` now answers the language question FIRST and owns the three
answers (declared / not declared / no model for this language); `judge_construct`
renders them and holds no language case of its own, so there is one decision
site and no dead branch. The comment above each function describes what that
function does.

The self-test is unchanged and still passes all 26 cases, including
`a construct in an unmodelled language` (now reached through the reachable
`return 2`) and arm 9g's two local-path cases.

Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (fully tested and validated)

* fix(design): anchor the Go receiver, and make two self-test arms actually run

Round 4 of the review found three defects in the arms and one in the block:

* The Go receiver pattern was `\([^)]*${recv}\)`, so `func (x *FooCpCmd) Run(` satisfied
  a citation of `CpCmd.Run` — a FALSE PASS of exactly the class this cutover exists to
  close. The receiver is now anchored (`(name *Type)`, `(*Type)`, `(name Type)`), and arm
  9h proves both directions: a method the pin declares passes, and one only a DIFFERENT
  receiver declares fails. Disabling the anchor turns 9h red (measured).
* Arm 9f ("a document reference is prose") appended BARE lines to `design/dulling.tsv`,
  which land in column 0 — the one column `cite_scan` never reads — so the arm exercised
  NOTHING. It is a real ledger row now, and the fixture carries a `DESIGN.md`: without it
  the slash-less-path prose guard swallowed the row first. Disabling the `.md` skip now
  turns 9f red (measured); before, it stayed green.
* `scripts/sync-pr-body.sh` is unchanged in this commit; its spike evidence is in the body.

Self-test: 28 cases, all live.

Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (fully tested and validated)

* style(design): collapse the duplicated self-test blocks the review found

Two copy-pasted blocks in the self-test: arm 9f carried the old comment AND the
new one (both still opening "9f."), and the end of arm 9g repeated the
write_ledger/emit_baseline reset pair twice. The behaviour was identical — the
duplicates are dead prose and a redundant reset — so this commit deletes them and
keeps one of each (#1360, block 3).

Self-test: 28 cases, unchanged and green.

Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (fully tested and validated)

* chore(design): name the pin-advance verb the tree ships, after its rename

`main` renamed the pin-advance verb `charly task sync` -> `charly task ff` in a
hard cutover (#1357), and the merge brought that in under this branch. Three of
this cutover's comments still named the retired verb -- the shared corpus-tag
library, the harness-config gate and the binding self-test -- so they described
a command that no longer exists (R5: a rename sweeps every reference in the same
change; R1: a doc that diverges from reality is an incident).

They now name `charly task ff`, which is also what the verb-scope classifier
looks for: with the stale names the gate reported all three as "classified as a
non-claim mention, but it no longer names the verb", and it is green again.

`scripts/sync-pr-body.sh` also became `scripts/ff-body.sh` in that cutover, and
the merge carried this branch's RACE_COUNT fix across the rename; the file's
self-test still passes.

Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (fully tested and validated)

* fix(sync): emit the pin-advance verb the tree ships, and pin it in the arm

The raced paragraph this cutover adds still emitted the RETIRED verb name: the
base's hard cutover renamed it (#1357), the merge carried my paragraph across the
rename untouched, and my sweep looked only at the three code comments I had
authored -- not at the SENTENCE the generator emits. The body then pasted that
sentence with the new name, so its evidence contradicted the committed script
(#1360, block 1).

The echo now emits `charly task ff`, and the self-test pins the VERB, not only
the rule it cites: the earlier arms asserted `Part II #3` and stayed green while
the sentence named a command that no longer exists.

Swept: a grep for the retired spelling across scripts/ returns nothing.

Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (fully tested and validated)

* fix(sync): drop the dead RACE_COUNT initialiser

`RACE_COUNT=0` was immediately overwritten by the assignment that follows it, on
every path — the `|| true` already guarantees a value. Leftover from the first
draft of the race count, and dead code in a file this cutover edits
(#1360, block 2).

The self-test is unchanged and green.

Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (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