Skip to content

chore(deed): declare the mint-replay drift in (variant (paths)), generated - #47

Merged
hyperpolymath merged 2 commits into
mainfrom
chore/deed-variant-paths
Nov 14, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
chore/deed-variant-paths

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

A declared divergence is a claim, not a proof. The owner reviews every line of this list before it merges. No auto-merge.

The drift check (scripts/check-mint-drift.sh) replays this repository's mint at its pinned template commit (c481073, 2026-11-04) with the answers recorded in (mint-answers) and reports what differs. Before the answers existed it exited 2 and could not replay; it now exits 1 with 162 undeclared differences. This PR declares them in (variant (paths …)), generated from the replay's own report. Nothing is typed by hand.

Counts after merging with the entries already in the deed:

List Already there From the replay Now
:added (exists here, the mint did not produce it) 0 70 70
:removed (the mint produces it, absent here) 4 1 5
:diverged (differs from the mint's output, in content or mode) 2 91 93

Checked: after the change the drift check exits 0 ("identical to a replay of the mint … modulo declared variant paths"). The deed linter reports OK before and after. The diff replaces only the old three-line (paths …) block; no (anchor) clause and no :repo-uuid is touched. Every line is one path, far under the 998-octet cap.

Not proven: CI on this head, and whether each declared path is a divergence the owner wants to keep. A path declared :diverged stops being checked against the mint; the owner should read the 93, especially the template-owned files among them (.github/*, hooks, rulesets), which are the ones a template upgrade would normally overwrite.

Commands:

git worktree add <dir>/tpl c48107311e652093efdc71deac3867f3f92c3a77   # in a rsr-template-repo clone
bash <template>/scripts/check-mint-drift.sh <dir>/tpl . > drift.txt      # in this repository, exit 1
bash gen_variant_paths.sh drift.txt secret-types_chora.deed              # script below
bash <template>/scripts/check-mint-drift.sh <dir>/tpl .                  # exit 0
gen_variant_paths.sh (not committed to the repository)
# gen_variant_paths.sh DRIFT_REPORT DEED — merge a mint-drift report into the deed's (variant (paths …)).
# Reads only the replay's own lines ("DRIFT: <path> <reason>"); types nothing by hand.
#   differs from what the mint produced ...        -> :diverged
#   exists here but the mint did not produce it    -> :added
#   was produced by the mint but is absent here    -> :removed
# Existing entries are kept; the result is sorted and de-duplicated. One path per line,
# so every line stays far under the deed's 998-octet cap.
set -euo pipefail
report=$1; deed=$2
tmp=$(mktemp -d)
grep -E '^DRIFT: ' "$report" | while IFS= read -r l; do
  p=${l#DRIFT: }; p=${p%% *}
  case "$l" in
    *'differs from what the mint produced'*)        printf '%s\n' "$p" >> "$tmp/diverged.new" ;;
    *'exists here but the mint did not produce it'*) printf '%s\n' "$p" >> "$tmp/added.new" ;;
    *'was produced by the mint but is absent here'*) printf '%s\n' "$p" >> "$tmp/removed.new" ;;
    *) echo "unclassified drift line: $l" >&2; exit 2 ;;
  esac
done
for k in added removed diverged; do : >> "$tmp/$k.new"; done
# existing entries: the three lists inside the (paths …) block, one quoted string each
awk '/^    \(paths/{on=1} on{print} on&&/\)\)\)$/{exit}' "$deed" > "$tmp/block.old"
for k in added removed diverged; do
  grep -oE ":$k \([^)]*\)" "$tmp/block.old" | grep -oE '"[^"]*"' | tr -d '"' > "$tmp/$k.old" || true
  cat "$tmp/$k.old" "$tmp/$k.new" 2>/dev/null | LC_ALL=C sort -u > "$tmp/$k.all"
done
{
  echo '    (paths'
  for k in added removed diverged; do
    if [ -s "$tmp/$k.all" ]; then
      printf '      :%s (\n' "$k"
      while IFS= read -r p; do printf '        "%s"\n' "$p"; done < "$tmp/$k.all"
      if [ "$k" = diverged ]; then printf '      )))\n'; else printf '      )\n'; fi
    else
      if [ "$k" = diverged ]; then printf '      :%s ()))\n' "$k"; else printf '      :%s ()\n' "$k"; fi
    fi
  done
} > "$tmp/block.new"
# splice: replace the old block (from "    (paths" through the line ending in ")))") in place
awk -v blockfile="$tmp/block.new" '
  /^    \(paths/ && !done { while ((getline line < blockfile) > 0) print line; skip=1; done=1 }
  skip { if ($0 ~ /\)\)\)$/) { skip=0 } ; next }
  { print }
' "$deed" > "$tmp/deed.new"
cp "$tmp/deed.new" "$deed"
for k in added removed diverged; do echo "$k: $(wc -l < "$tmp/$k.old") existing + $(sort -u "$tmp/$k.new" | wc -l) from report = $(wc -l < "$tmp/$k.all")"; done

Generated by Claude Code

The drift check (scripts/check-mint-drift.sh), which can run now that
(mint-answers) is recorded, replays the mint at the pinned template commit
(c481073) and reports 162 undeclared differences. This writes the replay's own
report into (variant (paths)) by script, merging with the entries already
there: 70 :added, 5 :removed (4 existing + 1), 93 :diverged (2 existing + 91).

A declared divergence is a claim, not a proof; the owner reviews the list. No
(anchor) clause and no :repo-uuid is touched, and every line is far under the
998-octet cap. After the change the drift check exits 0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7Zm6f3TYUpUuzGd5KAQ
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copy link
Copy Markdown
Owner Author

estate-rules is red here on step "Chain mint (a minted repo minted again) end to end": chain-mint: .../template does not contain the parent's template commit c48107311e65, then "FAIL: the parent mint failed".

This is not caused by this PR's change (the deed's (variant (paths)) list). The test on main, tests/e2e/chain_mint_test.sh (600 lines), is a stale copy of the template's test. Since #45 added (mint-answers) to the deed, that copy takes the wrong branch and fails. #46 replaces it with the template's current test (blob a0fab53) and is the fix; merge #46 before this PR. #46's own estate-rules had not finished when I wrote this, so I have not yet shown it passing. I will report it on #46 when it completes. I am not retriggering or skipping anything here.


Generated by Claude Code

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Hypatia grid green

🟢 clean · commit 8893d2007d2a · run 43630981266 · scope: this change (1 file(s))

Advisory: 11 row(s), worst 🟠 indeterminate (0 critical, 0 high) — reported, never grading the change.

Reporter Gate Status Critical High Medium Minor Since previous revision
Hypatia scan gating 🟢 clean 0 0 0 0 — no comparable baseline
panic-attack assail advisory 🟠 indeterminate 0 0 0 0 — no comparable baseline
pons asinorum advisory 🟠 indeterminate 0 0 0 0 — no comparable baseline
accessibilitybot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
cipherbot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
echidnabot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
finishingbot (release readiness) advisory 🟠 indeterminate 0 0 0 0 — no comparable baseline
glambot (presentation quality) advisory 🟠 indeterminate 0 0 0 0 — no comparable baseline
panicbot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
rhodibot (RSR compliance) advisory 🟠 indeterminate 0 0 0 0 — no comparable baseline
seambot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
sustainabot advisory ⚪ not applicable 0 0 0 0 — no comparable baseline
Hypatia scan: 11 finding(s)
  • 11 further finding(s) in files this change does not touch: reported, not graded (0 critical, 1 high).
panic-attack assail: not_run — no status envelope was produced
  • 🟠 indeterminate: no status envelope was produced
pons asinorum: not_run — no status envelope was produced
  • 🟠 indeterminate: no status envelope was produced
accessibilitybot: not_applicable — template default: enrol once the repository serves HTML
  • ⚪ not applicable: template default: enrol once the repository serves HTML
cipherbot: not_applicable — template default: enrol once the repository implements cryptography
  • ⚪ not applicable: template default: enrol once the repository implements cryptography
echidnabot: not_applicable — template default: enrol once the repository carries proofs and an ECHIDNA engine is configured
  • ⚪ not applicable: template default: enrol once the repository carries proofs and an ECHIDNA engine is configured
finishingbot (release readiness): not_run — enrolled, but no report-back was received
  • 🟠 indeterminate: enrolled, but no report-back was received
glambot (presentation quality): not_run — enrolled, but no report-back was received
  • 🟠 indeterminate: enrolled, but no report-back was received
panicbot: not_applicable — panic-attack is already graded by the verdict grid's own panic-attack row, from static-analysis-gate.yml evidence; enrolling panicbot would report one scanner twice and give two rows that can disagree
  • ⚪ not applicable: panic-attack is already graded by the verdict grid's own panic-attack row, from static-analysis-gate.yml evidence; enrolling panicbot would report one scanner twice and give two rows that can disagree
rhodibot (RSR compliance): not_run — enrolled, but no report-back was received
  • 🟠 indeterminate: enrolled, but no report-back was received
seambot: not_applicable — template default: enrol once a seam register exists at spec/seams/seam-register.json
  • ⚪ not applicable: template default: enrol once a seam register exists at spec/seams/seam-register.json
sustainabot: not_applicable — reserved fleet slot; no adapter exists (gitbot-fleet bots/sustainabot/README.adoc)
  • ⚪ not applicable: reserved fleet slot; no adapter exists (gitbot-fleet bots/sustainabot/README.adoc)

Scope: static findings reported by each row's tool at the named commit. The table grades only findings in files this change touches, so the colour answers "does this change introduce anything?", not "what does the whole repository still carry?". Standing findings are counted in each accordion and in report.json; the baseline filter remains the place where acknowledged debt is recorded. The lane state is the worst GATING row; advisory rows are listed and counted but never set it. Purple, red, yellow and blue grade the worst GRADED finding present; orange is evidence missing, malformed or a scanner that did not run; grey is an explicit scope exclusion with its reason. No row is a security certification. report.json, badge.json and the raw findings are in the verdict-grid artifact on the linked run.

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 14, 2026 19:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T19:24:34.264988Z 8893d20 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-14T19:25:45.724294Z 8893d20 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@hyperpolymath
hyperpolymath merged commit 6ded4df into main Nov 14, 2026
72 of 73 checks passed
@hyperpolymath
hyperpolymath deleted the chore/deed-variant-paths branch November 14, 2026 19:23
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.

3 participants