Skip to content

fix: mint the repo and clear the five red estate checks (stacked on #4) - #6

Merged
hyperpolymath merged 12 commits into
mainfrom
claude/zealous-wozniak-2nherb
Oct 14, 2026
Merged

hyperpolymath merged 12 commits into
mainfrom
claude/zealous-wozniak-2nherb

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Stacked on #4. This branch starts at #4's head, so until #4 merges its diff includes #4's commit. Merge #4 first and this PR shrinks to its own eleven commits.

The five checks red on #4 were all red on main too. Four had one root cause: the repo was created with GitHub's "use this template" from rsr-template-repo df09a6c (its first commit carries that commit's tree byte for byte) and was never minted. It still declared itself the template. Minting it exposed six defects in the template's own mint recipe, fixed here and to be sent upstream.

Check Cause Fix
OpenSSF Compliance 87 files with unfilled {{…}} tokens the mint
Central Estate CI/CD Audit CODEOWNERS and MAINTAINERS unfilled; CITATION.cff missing message the mint; CFF field
Dogfood Gate / Canon lockstep no resource-algebra_chora.deed the mint renames the deed
Estate Rules root PROOF-STATUS.adoc, resource-algebra.agda-lib; README with two titles root shape; README
Governance / Actions lockfile verify standards pin da2c748 installs gh-actions-lock unpinned (v0.2.0) re-pin to standards main, close the lock

It also fixes the CodeRabbit nit on #4 (check-agda.sh), and moves #4's hand-written "Asking the owner" CLAUDE.md section into the generated arrival pack, as the owner ruled.

Changes

  • fix(check-agda): a rejection must land inside the fixture's invalid definition. Negative controls: an earlier unrelated error and a fixture with no invalid both passed the old script and fail the new one.
  • fix(repo-init) ×2, template defects found by minting:
    • RSR_NON_INTERACTIVE shadowed read, so the automated mint crashed at an unset variable or looped forever.
    • The token pass rewrote just's own {{project}} interpolation.
    • CLAUDE.md and the repository map were left describing the template.
    • The self-name pass ate the deed's reject-if-contains detector.
    • A blank OpenSSF id deleted a table cell, breaking the render gate.
  • chore: mint: unedited just repo-init output.
  • fix(deed): true template provenance, birth date 2026-10-12, clade fv (owner's choice), and IS / IS-NOT taken from the README.
  • docs(arrival-pack): "Asking the owner" now sits in the estate-common block.
  • fix(estate-rules): PROOF-STATUS moves to docs/status/; the .agda-lib gets a justified allowlist entry; README template leftovers go; the map is regenerated.
  • fix(citation): the CFF 1.2.0 message field.
  • fix(ci): the six standards reusables re-pinned to ae36881 with standards' own propagate-workflow-pins.sh; actions.lock re-keyed and closed.
  • docs(changelog).

RSR Quality Checklist

Required

  • Tests pass: bash scripts/check-agda.sh, core proofs plus all 5 rejections
  • No banned language patterns
  • No banned functions
  • SPDX license headers present on all new/modified source files
  • No secrets, credentials, or .env files included

As Applicable

  • Repo deed (status) / (maturity) updated
  • Repo deed (ecosystem) updated
  • Documentation updated
  • CHANGELOG updated

Testing

Every step of the five failing workflows was run locally on this tree with the CI-pinned tools (Agda 2.6.3 locally, Nickel 1.17.0, asciidoctor 2.0.26):

  • Estate Rules: 18 of 18 steps pass. 16 of them had never run here, because the job died at root shape.
  • Central Estate Audit: 26 of 26 gates pass, run from cicd-suite@0da816c. On main it stopped at gate 1.
  • OpenSSF placeholder gate, Lock Sync (repo copy and standards main's copy) and the canon lockstep comparison, using the gate's own readers: pass.
  • actions.lock: zero dangling edges.

Not verifiable locally: the governance reusable's gh actions-lock --verify-local half, the deed and k9 ecosystem validators, and the RSR oracle. CI is the evidence for those.

Open for the owner: register resource-algebra in gv-clade-index (the owner's act). docs/AI_INSTALLATION_GUIDE.adoc is still the template's text.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi


Generated by Claude Code

claude added 10 commits October 14, 2026 09:50
…finition

The harness accepted any diagnostic in a reject fixture that mentioned the
file and said "when checking that". An earlier, unrelated type error
therefore passed as the expected rejection before Agda ever reached the
claim the fixture exists to refute, and a fixture with no `invalid`
definition at all passed too.

The first location Agda reports in the fixture must now lie inside the
`invalid` definition: from its first clause (not the type signature) to
the last clause or continuation line before the next top-level
declaration. A fixture with no `invalid` definition fails loudly.

Validated on Agda 2.6.3: all five fixtures still pass, each at its
`invalid` line. Negative controls run against the old and new script:
- earlier unrelated error: old PASS, new FAIL (line 7, outside 10-10)
- no `invalid` definition: old PASS, new FAIL
- error on a continuation line of `invalid`: old PASS, new PASS

Reported by CodeRabbit on resource-algebra#4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
…ectly

Found while minting this repository, which was created with GitHub's
"use this template" (its first commit carries rsr-template-repo
df09a6c's tree byte for byte) and never minted. Every fix below was
exercised by the mint in the next commit.

1. RSR_NON_INTERACTIVE never worked. It shadowed `read` with a no-op
   for the whole recipe, so (a) any prompt the environment did not
   answer left its variable unset and `set -u` killed the mint at
   OPENSSF_BP_ID, after docs/ had already been overwritten, and (b)
   every `while read -r` loop inherited the no-op and spun forever on an
   unbound `file`. Prompts now go through `ask`, which keeps the
   environment's value (or empty) and leaves the builtin alone. The e2e
   test drives only the interactive path, which is why nothing noticed.

2. The token pass rewrote just's own interpolation. In Justfile and
   *.just every double-brace expression is a just variable; the lowercase
   project token is spelled like just's interpolation of `project`, so
   seven Justfile lines, the contractile Justfile and container.just's
   image tag froze into `resource_algebra`. just files are now skipped by
   the token pass; the self-name pass still rewrites them.

3. The mint left CLAUDE.md and the repository map describing the
   template. The arrival pack named this repo the estate's `foundation`
   with the template's uuid and clade; the map kept archetypes/, which
   the mint deletes, so Estate Rules' map-freshness step failed in every
   minted child. Both are regenerated after the deed is final.

4. The self-name pass rewrote a detector. The deed's state-validation
   `:reject-if-contains ("rsr-template-repo")` became the child's own
   slug, so it rejected every legitimate state file of the child. Lines
   carrying `reject-if-contains` are now protected like provenance lines.

The same change belongs upstream in rsr-template-repo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
This repository was created with GitHub's "use this template" from
rsr-template-repo df09a6c (its first commit carries that commit's tree
byte for byte) and was never minted. It therefore still declared itself
the template: rsr-template-repo_chora.deed with the template's uuid,
clade and `foundation` pipeline position, 87 files of unfilled
placeholder tokens, a CODEOWNERS assigning no owner, and a MAINTAINERS
naming nobody. Four estate checks were red on main for exactly that:
OpenSSF Compliance, Central Estate CI/CD Audit, Dogfood Gate (Canon
lockstep) and, behind the root-shape failure, Estate Rules.

This commit is the unedited output of the fixed recipe in the previous
commit, run non-interactively:

  RSR_NON_INTERACTIVE=1 PROJECT_NAME="Resource Algebra" \
  REPO=resource-algebra OWNER=hyperpolymath \
  AUTHOR="Jonathan D.A. Jewell" AUTHOR_EMAIL=j.d.a.jewell@open.ac.uk \
  AUTHOR_ORG="The Open University" \
  PROJECT_DESCRIPTION="The parametric grade algebra shared by the hyperpolymath type family" \
  just repo-init

Values are the ones CITATION.cff and the SPDX headers already state.
The mint reported: all placeholders replaced; deed renamed to
resource-algebra_chora.deed; uuid 241f1c29-0838-5033-b654-7f4c5e279ebc
(uuid5 of github.com/hyperpolymath/resource-algebra); CLAUDE.md and the
repository map regenerated; `just verify` PASS. What the recipe cannot
know (true template provenance, birth date, clade) follows in the next
commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
…d is given

Exposed by the previous commit's mint. With OPENSSF_BP_ID blank, the
recipe deleted every line of docs/governance/TEMPLATE-STANDARDS-AUDIT.adoc
holding the OpenSSF token. That line is one cell of a six-column table
row, so the row lost a cell, asciidoctor reported "dropping cells from
incomplete row detected end of table", and Estate Rules' render gate
failed in every child minted without an OpenSSF id.

The document names the README's badge tokens rather than using them, so
the row now spells them as plain names (OPENSSF_PROJECT_ID, OWNER, REPO).
Neither the substitution pass nor the placeholder gate touches them, and
the recipe no longer edits that file. Verified: the file renders clean
under asciidoctor 2.0.26 --failure-level=WARN, and
scripts/check-adoc-renders.sh passes on the whole tree.

The same change belongs upstream in rsr-template-repo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
What the mint cannot know, corrected by hand in the deed and projected
into CLAUDE.md by `just claude-md`:

- Provenance. The mint ran on this repository's own history, so it
  recorded a resource-algebra commit as the template parent. The real
  parent is rsr-template-repo df09a6c on main: this repository's first
  commit carries that commit's tree (2c01b6f) byte for byte. (variant
  :parent-pin) and (provenance :template-commit/-tree/-branch) now say so.
- Birth. The repository was created 2026-10-12, not at the 2026-10-14
  mint: (lineage :born), (status :since) and its history entry.
- Clade fv, Formal Verification & Proofs, chosen by the owner. The
  template leaves the clade UNASSIGNED because choosing is a human act.
- (ecosystem) :position-type, :purpose and :not, transcribed from the
  README's own Overview and "What this is not" rather than invented.

CLAUDE.md's generated region now states this repository's identity
(uuid 241f1c29-..., clade fv, born 2026-10-12) instead of the template's;
.machine_readable/arrival-pack/verify.sh reports it in sync with the deed.
Registration in gv-clade-index remains the owner's act and is not done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
resource-algebra#4 appended the owner's rule (put every question that
needs the owner's decision through the AskUserQuestion selector) to
CLAUDE.md as a hand-authored section, and CodeRabbit flagged it as out of
scope for #3. The owner ruled (2026-10-14) that it belongs in the estate
arrival pack: it governs how every agent asks the owner, in every repo.

The rule now lives in the estate-common block of
.machine_readable/arrival-pack/arrival-pack.ncl, wording unchanged, and
CLAUDE.md carries it inside the generated region instead of below it.
.machine_readable/arrival-pack/verify.sh reports the pack in sync. The
canonical copy of arrival-pack.ncl is rsr-template-repo's; the same edit
goes upstream so every repo receives the rule on regeneration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
Estate Rules failed at its second step on main (root shape), so none of
its later steps had ever run here. With the root fixed, the render gate
was the next failure. All 18 steps now pass locally, run as CI runs them.

- PROOF-STATUS.adoc moves to docs/status/PROOF-STATUS.adoc, the
  template's canonical location; the allowlist records PROOF-* at the
  root as drift the April 2026 root cleanup relocated. It replaces the
  unused template stub that sat there. README links follow.
- resource-algebra.agda-lib stays at the root, as a justified REQUIRED
  allowlist entry: Agda finds the library file by walking up from each
  source file, consumers register its path, and Agda convention keeps it
  at the project root. Moving it would break consumers' registrations.
- README.adoc had two level-0 titles (lines 4 and 8), which asciidoctor
  rejects outside a book; the duplicate title block is removed. Below the
  owner's "RSR template sections below; swept by `just repo-init`"
  marker, the sections the template itself marks for deletion after a
  mint are removed (its "this file is a template" admonition, "What this
  is", "Quick start"), and the AI-install lines the self-name pass had
  made false ("Create a new repository from .../resource-algebra") take
  the canonical child wording from standards'
  3-practice/provisioning/templates/README-ai-install.adoc.tmpl. The
  [[ai-install]] section that `just validate-ai-install` requires stays.
- docs/architecture/REPOSITORY-MAP.adoc regenerated (`just repo-map`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
The Central Estate CI/CD Audit stopped at its first gate (Required Files)
on main, so its other 25 gates had never run here. Run locally from
cicd-suite 0da816c, the pin main-estate-audit.yml uses, 25 of 26 passed
after the mint; the Academic Referencing Gate failed with "CITATION.cff
is missing the required top-level 'message' field". `message` is a
required key of the CFF 1.2.0 schema. The wording is the template's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
Governance / Actions lockfile verify was red on main. At the pinned
standards commit da2c748, governance-reusable.yml installs
github/gh-actions-lock UNPINNED, so a new release (cli v0.2.0) changed the
verdict for every caller. Its staged verifier accepted the seven
reusable-workflow "stale" findings as coverage, as designed, but then
failed on two `sha-as-ref` warnings for codeql.yml's bare-SHA
github/codeql-action pin. Standards main already carries both cures
(standards#1120 pins the tool to v0.1.6, and update-actions-lock.sh
treats sha-as-ref as advisory). A pinned caller never receives a cure
until its pin moves, so this moves it.

- The six standards reusable calls now pin ae36881 (standards main,
  2026-10-14), rewritten by standards' own
  scripts/propagate-workflow-pins.sh --fix, whose ancestry check passed.
- actions.lock follows by hand, as check-lock-sync.sh prescribes for
  job-level reusable refs: the six workflow entries are re-keyed, the
  hyperpolymath/standards dependency record is rebuilt for ae36881 with
  the actions its reusables use at that commit, and the three records it
  newly needs (actions/upload-artifact@cf430e0 v7.0.2,
  dtolnay/rust-toolchain@e2a55d2, Swatinem/rust-cache@6323deb) are
  copied verbatim from standards' own actions.lock. Four records only
  the old commit used are pruned; record order matches the generator's.

Verified: zero dangling edges (GitHub's startup rule), and both
scripts/check-lock-sync.sh and standards main's copy pass. The
gh-actions-lock --verify-local half runs only in CI.

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

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 161 files, which is 61 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration
  • Configuration used: Repository: hyperpolymath/resource-algebra/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f89667b2-c4ba-4156-9f22-e9eef3e5bdd7
📥 Commits

Reviewing files that changed from the base of the PR and between 0b338c9 and b0e4189.

⛔ Files ignored due to path filters: 2
  • .github/workflows/actions.lock is excluded by !**/*.lock
  • archetypes/julia-library/actions.lock is excluded by !**/*.lock
📒 Files selected for processing: 161
  • .clinerules
  • .cursorrules
  • .devcontainer/Containerfile
  • .devcontainer/README.adoc
  • .devcontainer/devcontainer.json
  • .devcontainer/docker/devcontainer.json
  • .editorconfig
  • .envrc
  • .gitattributes
  • .github/CODE_OF_CONDUCT.md
  • .github/CONTRIBUTING.md
  • .github/GOVERNANCE.md
  • .github/ISSUE_TEMPLATE/config.yml
  • .github/SECURITY.md
  • .github/SUPPORT.md
  • .github/copilot-instructions.md
  • .github/dependabot.yml
  • .github/hooks/validate-deed.sh
  • .github/settings.yml
  • .github/workflows/deed-validate.yml
  • .github/workflows/dogfood-gate.yml
  • .github/workflows/governance.yml
  • .github/workflows/hypatia-scan.yml
  • .github/workflows/mirror.yml
  • .github/workflows/ossf-best-practices.yml
  • .github/workflows/rust-ci.yml
  • .github/workflows/scorecard.yml
  • .github/workflows/secret-scanner.yml
  • .github/workflows/sonarqube.yml
  • .machine_readable/ai/PLACEHOLDERS.adoc
  • .machine_readable/arrival-pack/README.adoc
  • .machine_readable/arrival-pack/arrival-pack.ncl
  • .machine_readable/arrival-pack/claude-md.k9.ncl
  • .machine_readable/arrival-pack/extract.sh
  • .machine_readable/coaptation/README.adoc
  • .machine_readable/coaptation/coapt.k9.ncl
  • .machine_readable/coaptation/coapt.ncl
  • .machine_readable/coaptation/coapt.sh
  • .machine_readable/coaptation/extract-facts.sh
  • .machine_readable/coaptation/receipts/latest.toml
  • .machine_readable/coaptation/witness-map.ncl
  • .machine_readable/compliance/reuse/dep5
  • .machine_readable/configs/eclexiaiser.toml
  • .machine_readable/configs/git-cliff/cliff.toml
  • .machine_readable/configs/stapeln.toml
  • .machine_readable/contractiles/Justfile
  • .machine_readable/contractiles/README.adoc
  • .machine_readable/contractiles/adjust/adjust.k9.ncl
  • .machine_readable/contractiles/bust/bust.k9.ncl
  • .machine_readable/contractiles/dust/dust.k9.ncl
  • .machine_readable/contractiles/intend/intend.k9.ncl
  • .machine_readable/contractiles/must/must.k9.ncl
  • .machine_readable/contractiles/trust/trust.k9.ncl
  • .machine_readable/descriptiles/README.adoc
  • .machine_readable/descriptiles/provisioning_praxis.deed
  • .machine_readable/scripts/maintenance/maint-assault.sh
  • .machine_readable/self-validating/README.adoc
  • .machine_readable/self-validating/examples/ci-config.k9.ncl
  • .machine_readable/self-validating/examples/project-metadata.k9.ncl
  • .machine_readable/self-validating/examples/setup-repo.k9.ncl
  • .machine_readable/self-validating/methodology-guard.k9.ncl
  • .machine_readable/self-validating/template-hunt.k9.ncl
  • .machine_readable/self-validating/template-kennel.k9.ncl
  • .machine_readable/self-validating/template-yard.k9.ncl
  • .mailmap
  • .windsurfrules
  • CHANGELOG.adoc
  • CLAUDE.md
  • CONTRIBUTING.adoc
  • Justfile
  • README.adoc
  • archetypes/README.adoc
  • archetypes/julia-library/julia-library_praxis.deed
  • archetypes/julia-library/overlay/.github/workflows/julia-ci.yml.in
  • archetypes/julia-library/overlay/.github/workflows/julia-docs.yml.in
  • archetypes/julia-library/overlay/Project.toml.in
  • archetypes/julia-library/overlay/src/PACKAGE.jl.in
  • archetypes/julia-library/overlay/test/cases/smoke.jl
  • archetypes/julia-library/overlay/test/runtests.jl
  • build/container/Containerfile
  • build/container/README.adoc
  • build/container/compose.yaml
  • build/container/entrypoint.sh
  • build/container/stapeln/.gatekeeper.yaml
  • build/container/stapeln/compose.toml
  • build/container/stapeln/ct-build.sh
  • build/container/stapeln/deploy.k9.ncl
  • build/container/stapeln/manifest.toml
  • build/container/stapeln/rokur.toml
  • build/container/stapeln/vordr.toml
  • build/docs-seed/README.adoc
  • build/guix.scm
  • build/just/assess.just
  • build/just/groove.just
  • build/just/provision-lib.sh
  • build/just/repo-init.just
  • build/just/validate.just
  • build/manifest.scm
  • build/templates/ROADMAP.adoc.in
  • build/templates/identity.deed.in
  • docs/AFFIRMATION.adoc
  • docs/AI_INSTALLATION_GUIDE.adoc
  • docs/QUICKSTART.adoc
  • docs/RSR-PHILOSOPHY.adoc
  • docs/SETUP.adoc
  • docs/architecture.adoc
  • docs/architecture/REPOSITORY-MAP.adoc
  • docs/architecture/THREAT-MODEL.adoc
  • docs/attribution/CITATIONS.adoc
  • docs/contributing.adoc
  • docs/decisions/0000-template.adoc
  • docs/decisions/0001-adopt-rsr-standard.adoc
  • docs/decisions/0001-template.adoc
  • docs/developer/ABI-FFI-README.adoc
  • docs/governance/CRG-AUDIT-TEMPLATE.adoc
  • docs/governance/TEMPLATE-LINEAGE-AUDIT.adoc
  • docs/governance/TEMPLATE-STANDARDS-AUDIT.adoc
  • docs/onboarding/QUICKSTART-DEV.adoc
  • docs/onboarding/QUICKSTART-MAINTAINER.adoc
  • docs/onboarding/QUICKSTART-USER.adoc
  • docs/onboarding/llm-warmup-dev.adoc
  • docs/onboarding/llm-warmup-maintainer.adoc
  • docs/onboarding/llm-warmup-user.adoc
  • docs/practice/AI-CONVENTIONS.adoc
  • docs/practice/STATE-VISUALIZER-GUIDE.adoc
  • docs/practice/ci-cost-reduction.adoc
  • docs/proposals/root-cleanup.adoc
  • docs/reports/audit/pillar-audit-2026-04-15.adoc
  • docs/status/PROOF-NEEDS.adoc
  • docs/status/READINESS.adoc
  • docs/status/ROADMAP.adoc
  • docs/status/TEST-NEEDS.adoc
  • docs/troubleshooting.adoc
  • docs/usage.adoc
  • launcher.sh
  • mise.toml
  • resource-algebra_chora.deed
  • scripts/campaigns/www-bundle.campaign
  • scripts/check-agda.sh
  • scripts/check-no-placeholders.sh
  • scripts/deed-field.sh
  • scripts/migrate-wellknown-to-www.sh
  • scripts/sweep-wellknown.sh
  • scripts/validate-template.sh
  • sonar-project.properties
  • src/interface/ffi/src/main.zig
  • tests/aspect_tests.sh
  • tests/e2e.sh
  • tests/e2e/template_instantiation_test.sh
  • tests/workflows/mint_cleanup_test.sh
  • tests/workflows/template_conformance_test.sh
  • www/.well-known/aibdp.json
  • www/.well-known/humans.txt
  • www/.well-known/security.txt
  • www/README.adoc
  • www/dns/records/example.invalid.zone
  • www/policies/acceptable-use.adoc
  • www/policies/ai-use.adoc
  • www/policies/privacy.adoc
  • www/public/index.html
  • www/tests/check-migration.sh

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Comment @coderabbitai help to get the list of available commands.

In non-interactive mode every other prompt falls back to the variable of
its own name (OWNER, AUTHOR, FORGE, ...), but the service name, port and
registry read only `_SERVICE_NAME`, `_PORT` and `_REGISTRY`, so
SERVICE_NAME=... in the environment was silently ignored. They now fall
back to SERVICE_NAME, PORT and REGISTRY like the rest, and the prompts
show the effective default, because PORT is a common shell variable and
a blank answer must not pick it up unannounced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
hyperpolymath added a commit to hyperpolymath/rsr-template-repo that referenced this pull request Oct 14, 2026
…y; standards re-pin (#237)

## Summary

Root-cause fixes for the estate checks that were red on
[resource-algebra#4](hyperpolymath/resource-algebra#4).
That repo was created with GitHub's "use this template" from `df09a6c`
and never minted. Minting it
([resource-algebra#6](hyperpolymath/resource-algebra#6))
exposed defects in this template's mint recipe, and showed that every
child inherits a broken standards pin from here. These are fixed at
source so new repos don't inherit them.

## Changes

- **`fix(repo-init)`**: six recipe defects, each exercised by real
mints.
- `RSR_NON_INTERACTIVE` stubbed `read` for the whole recipe. Unanswered
prompts then died under `set -u`, and the substitution loops never
ended. Prompts now go through `ask`, which reads the environment.
Service name, port and registry now honour their environment variables
too.
- The token pass rewrote `just`'s own interpolation of `project` in
Justfile and `*.just`. `just` files are now skipped by that pass.
- CLAUDE.md and the repository map were left describing the template.
Both are now regenerated from the child's deed and tree.
- The self-name pass rewrote the deed's `reject-if-contains` detector
into the child's own name.
- A blank OpenSSF id deleted a table cell in
`TEMPLATE-STANDARDS-AUDIT.adoc`, breaking the render gate.
- `identity.deed.in` gains `:pipeline-position` and `:chain` as
`UNASSIGNED`.
- **`test(repo-init)`**: `tests/workflows/non_interactive_mint_test.sh`,
wired into Estate Rules with a checksum-verified `just` 1.43.0. No
workflow ran `repo-init` before; `tests/e2e` runs nowhere in CI.
- **`docs`**: four documents told agents never to use
`RSR_NON_INTERACTIVE`. They now describe the working
environment-variable path. The guide's prompt table gains the missing
ORCID row and a variable column.
- **`docs(arrival-pack)`**: the owner's "Asking the owner" rule joins
the estate-common block, per the owner's ruling of 2026-10-14.
- **`fix(ci)`**: the six standards reusables re-pinned from `da2c748` to
standards main `ae36881`, with `actions.lock` re-keyed and closed. At
`da2c748` the governance reusable installs `gh-actions-lock` unpinned,
and v0.2.0 fails every caller on `sha-as-ref`. Standards main pins
v0.1.6 and treats `sha-as-ref` as advisory.
- **`fix(archetypes)`**: the julia-library lock fragment moves to format
v0.0.3.
[#236](#236)
moved the spine lock to v0.0.3, so `archetype_lock_merge_test.sh` fails
on `main` and Julia mints stop at the merge.
- **`docs(changelog)`**.

## RSR Quality Checklist

### Required

- [x] Tests pass: every Estate Rules step and the key gates run locally
on this tree (below)
- [x] No banned language patterns
- [x] SPDX license headers present on all new files
- [x] No secrets, credentials, or `.env` files included

### As Applicable

- [x] Documentation updated
- [x] `CHANGELOG` updated under [Unreleased] / Fixed

## Testing

- **Template mode.** All Estate Rules steps pass on this tree, including
the new test. `archetype_lock_merge_test.sh` fails on `main` without the
fragment fix; it was reproduced on `e2c87e6`. Placeholders, root shape,
render, lock sync (repo and standards main) and the arrival-pack check
all pass.
- **The new test, watched failing.** On the old recipe it fails twice
over: the `read()` shim, and "PROJECT_NAME: unbound variable". It passes
on the new recipe with `just` 1.43.0.
- **A full non-interactive mint of this tree** with only the five
required answers (`mint-check`) exits 0. The minted child passes
placeholders, root shape, render (158 files), arrival pack and map
freshness. It has no underscored names in `just` files and keeps its
detector.
- **resource-algebra** was minted with the same recipe. There, all 18
Estate Rules steps and all 26 Central Estate Audit gates (cicd-suite
`0da816c`) pass locally.

Not verifiable locally: the governance reusable's `gh actions-lock
--verify-local` half. CI is the evidence for it.

## Not fixed here

- `scripts/gen-repo-map.sh` breaks on an apostrophe in a
`root-allow.txt` comment (`xargs: unmatched single quote`).
- `docs/AI_INSTALLATION_GUIDE.adoc` and the README tail are written for
the template, and a minted child keeps them verbatim.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi

---
_Generated by [Claude
Code](https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
@hyperpolymath
hyperpolymath marked this pull request as ready for review October 14, 2026 11:12
#4 merged with five more commits that overlap this branch, and #5 bumped
actions. Resolved in favour of the owner-merged content, keeping what
main does not yet carry (the mint itself: 87 placeholder files, the
template-only paths, provenance):

- check-agda.sh: both hardenings. main's `-- EXPECT:` message check and
  unit-test run, and this branch's rule that the first error must land
  inside `invalid`. All 8 fixtures, including main's three new ones, pass
  both on Agda 2.6.3; the unit tests pass.
- Deed: clade fv (the owner's answer) and this branch's provenance,
  variant and rsr-profile; main's phase `active`, ecosystem
  (library, kernel, chain), anchor kind/domain and unique strength.
  `:coordination standards` restored (main's ecosystem dropped it).
- PROOF-STATUS, CITATION message, CODEOWNERS comment, allowlist lines:
  main's. The duplicate .agda-lib allowlist entry is dropped.
- ROADMAP: the minted stub. main's file was still the template's own
  journal ("A repo minted from the template does not inherit it").
- actions.lock: main's upload-artifact v7.0.2 plus the cf430e0 record
  the standards@ae36881 record needs.
- CLAUDE.md and the repository map regenerated from the merged tree.
  main removed #4's hand-appended "Asking the owner" section (6c61289);
  the rule stays only in the generated estate-common block, per the
  owner's ruling that it is estate doctrine.

Verified on the merged tree: Estate Rules 18/18 steps, all 26 Central
Estate Audit gates (cicd-suite 0da816c), the placeholder gate, both
lock-sync gates, the arrival-pack check, and scripts/check-agda.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 768068f into main Oct 14, 2026
64 of 66 checks passed
@hyperpolymath
hyperpolymath deleted the claude/zealous-wozniak-2nherb branch October 14, 2026 11:15
hyperpolymath added a commit that referenced this pull request Oct 14, 2026
## Summary


[resource-algebra#6](#6)
was merged at `b0e4189`, before its last two commits were pushed. Main
(`768068f`) therefore still fails two governance jobs. This PR carries
those two commits, rebased onto main.

| Check on main | Cause | Fix |
|---|---|---|
| governance / Actions lockfile verify | standards `ae36881` installs
`gh-actions-lock` v0.1.6, which refuses lock format v0.0.3 ("newer than
this binary supports") | re-pin the six standards reusables to
`934b879`, whose governance job pins v0.2.0 |
| governance / UUID v7 conformance | the arrival pack printed the deed's
uuid5 as a hex literal into CLAUDE.md; `check-uuid-v8.sh --strict`
rejects non-v8 hex | print the deed's typed literal
`#u5"github.com/hyperpolymath/resource-algebra"` instead |

## Changes

- **`fix(arrival-pack)`**: `extract.sh` takes `:repo-uuid` as the typed
`#u<n>"…"` literal, as the deed writes it, rather than as hex. A deed
whose uuid is not a typed literal stops generation (exit 2) instead of
printing an empty field. CLAUDE.md is regenerated.
- **`fix(ci)`**: the six `hyperpolymath/standards` reusables are
re-pinned to `934b879` (standards main). `actions.lock` is re-keyed with
standards' `propagate-workflow-pins.sh`, using the relock step proposed
in
[hyperpolymath/standards#1254](hyperpolymath/standards#1254).
The lock gains the two records the new pin reaches
(`denoland/setup-deno`, `oven-sh/setup-bun`).

## RSR Quality Checklist

### Required

- [x] Tests pass: `bash scripts/check-agda.sh` (unchanged by this PR)
- [x] No banned language patterns
- [x] No banned functions
- [x] SPDX license headers present on all new/modified source files
- [x] No secrets, credentials, or `.env` files included

### As Applicable

- [x] Documentation updated (CLAUDE.md regenerated, not hand-edited)

## Testing

On this tree:

- `standards/scripts/check-uuid-v8.sh --strict .`: exit 0. On main it
fails on `./CLAUDE.md`.
- `scripts/check-lock-sync.sh`: exit 0, with 0 dangling edges and a lock
key for every workflow. Standards main's copy also passes.
- `.machine_readable/arrival-pack/verify.sh`: CLAUDE.md matches the
generator.

I can't run the `gh actions-lock --verify-local` half of the lockfile
job locally, so CI is the evidence for it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi

---
_Generated by [Claude
Code](https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi)_
hyperpolymath added a commit to hyperpolymath/standards that referenced this pull request Oct 14, 2026
…n bumpers (#1254)

## Why

`scripts/apply-workflow-pins-remote.sh`, the scheduled pin applier,
fetches and commits only `*.yml`. The local `propagate-workflow-pins.sh`
has the same gap. Both re-point `uses: hyperpolymath/standards/...@SHA`
and leave `actions.lock` keyed to the old commit. `check-lock-sync.sh`
rejects that state, and its own header records GitHub refusing such runs
at startup.

The ledger census in `apply-workflow-pins.yml` counts 200 of 368
governance callers with an `actions.lock`. A fix-mode run would
therefore have opened PRs that stop those repos' reusable-calling
workflows.

This came up while fixing a stale `da2c748` pin, whose unpinned
`gh-actions-lock` fails Actions lockfile verify. That fix landed in
[resource-algebra#6](hyperpolymath/resource-algebra#6)
and
[rsr-template-repo#237](hyperpolymath/rsr-template-repo#237),
and both needed this relock done by hand.

## What

- **`scripts/relock-standards-pin.sh`** (new) moves a consumer's lock to
the target standards commit:
  - re-keys the per-workflow entries;
- rebuilds the standards dependency record from what the reusables
called with a full pin use at the target;
  - copies the records those need verbatim from standards' own lock;
  - prunes only records the old standards record alone kept alive;
  - keeps `gh-actions-lock`'s record order.
- **Short pins.** A short pin of 7 or more hex that prefixes the target
is current. This matches the applier, which counts it FRESH and leaves
it as written. It keeps its own short-keyed record, untouched.
- **It is fail-closed.** It leaves the lock untouched and exits 1 when:
  - a workflow pins another standards commit, or a pin under 7 hex;
  - a reusable is absent at the target;
  - the old record is missing;
  - a needed record is in neither lock;
- a workflow's standards entries would not name exactly the refs it
pins.
- **The applier** fetches `actions.lock` with the workflows and relocks
it in the same verified commit. A repo whose lock can't follow is
reported `LOCK-REFUSED` and not landed. In fix mode it fetches the
target commit if the CI checkout lacks it, and a new known-answer
control fails the run if the relock is missing.
- **The propagator** relocks before staging and reports `RELOCKED` /
`LOCK-REFUSED`. On a refusal it restores the workflows it rewrote,
uncommitted edits included, stages nothing, and leaves the branch alone.
Any refusal makes it exit 1.
- **Ported:** the frozen job-name fix that #1255 and #1256 also carry.
Self Test is red on main without it.

## Evidence

- **Known answers.** On resource-algebra and rsr-template-repo,
re-pinned from `da2c748` to `ae36881`, the relock reproduces byte for
byte the locks verified by hand there. Both pass `check-lock-sync.sh`.
resource-algebra's lock relocked to `934b879` passes the governance
gate's own `update-actions-lock.sh --verify-local` with gh-actions-lock
v0.2.0.
- **`scripts/tests/relock-standards-pin-test.sh`**, offline, 16 checks:
  - the known answer, and idempotence;
  - eight refusals that leave the lock byte-identical;
  - the no-lock no-op;
  - short pins at 7, 12 and 39 hex, each passing `check-lock-sync.sh`.
- **`scripts/tests/propagate-workflow-pins-test.sh`**: 29 of 29.
- **Mutants**, all killed:
- from the first round: no iteration, no pruning, no record copying, no
stale-pin refusal, over-pruning, no sorting;
- from the review round: exact-match only, every pin feeding the record,
no 7-hex minimum, no consistency guard, no restore, no early return.
- **Existing suites.** `check-lock-sync-test.sh` 13 of 13, and the
applier's `--self-test`.

The review round built on CodeRabbit's autofix commits (`cccec83`,
`5fd1373`) and kept their tests.

Not exercised: a live fix-mode applier run. It needs the dedicated App
credential, and it is the owner's dispatch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.

2 participants