Skip to content

ci: fix the Codex review findings on the template CI port - #16

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

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

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Follow-up to #15, which merged while its Codex review was still being answered. This PR fixes the five findings that were real defects. The other two are answered below.

Changes

  • build/just/repo-init.just. Codex threads: the strip-instruction-blocks P1, the mint-verbatim P1 and the gen-repo-map P2.
    • ci: follow standards to metadatastician; port the template's CI #15 ported the template's mint scripts but kept the older generator, the template's 0afa6c9 copy.
    • That generator called strip-instruction-blocks ., which the new tool rejects with exit 2. It also ignored mint-verbatim.txt and mapped the index instead of the worktree.
    • The generator is now the template's at 8034fc9, verbatim, which is how mint-verbatim.txt says a child carries it. It feeds the tool a file list, honours the manifest and passes gen-repo-map.sh --worktree.
  • secret-scanner.yml. Codex thread: P1, security.
    • Before, a repository .gitleaks.toml replaced the estate baseline in all three passes, so a pull request could add a permissive local config and pass.
    • Now the baseline always runs, and a local config adds a second pass.
  • scripts/check-required-contexts.sh. Codex thread: P2.
    • A mapped context now also needs a job whose check-run name (name:, or the job id) is exactly that context.
    • squabble_gate_test.sh names its fixture jobs after the context, so each mutant still fails only for its own defect. Two mutants are new: a renamed job and a workflow with no jobs.
  • main-estate-audit.yml. Codex thread: P2.
    • At the pinned bf7dd95, cicd-suite's spdx-license-check enforces only a root licence file. When the repository has no SPDX line at all, it emits a ::warning::; its exit is commented out "until adoption".
    • The inlined step already enforced the same thing. It now carries the warning too, so it mirrors that gate exactly. Per-file SPDX enforcement does not exist upstream, and adding it is a licence-policy decision for the owner, so it is not added here.
  • CHANGELOG. A new entry. ci: follow standards to metadatastician; port the template's CI #15's entry stays as merged.

Not changed: container.just deploy rendering (Codex P2).

  • container-init is a one-shot: it fills tokens, then renames deploy.k9.ncl.in.
  • In this repository it has already run, and every container file is rendered. Re-running it changes no file, deploy.k9.ncl included, which takes the recipe's "already exists, not overwritten" branch.
  • So shipping the .in here would only reintroduce a token file into a minted child.

RSR Quality Checklist

Required

  • Tests pass (just test or equivalent). Not run in full: just test and just quality stop locally at the idris2 and zig steps, because neither toolchain is installed here. CI provisions both. Every suite this PR touches passes; see Testing.
  • Code is formatted (just fmt or equivalent)
  • Linter is clean (no new warnings or errors)
  • No banned language patterns (no Python, Go, TypeScript, Deno or ReScript; JavaScript runs on Bun)
  • No unsafe blocks without // SAFETY: comments
  • No banned functions (believe_me, unsafeCoerce, Obj.magic, Admitted, sorry)
  • SPDX license headers present on all new/modified source files
  • No secrets, credentials, or .env files included

As Applicable

  • CHANGELOG or release notes updated

Testing

  • Gitleaks 8.18.4, sha256-verified as the workflow pins it, run through the workflow's own working-tree step:
    • Planted AWS-shaped key plus a local .gitleaks.toml that allowlists every path: the new step exits 1. The old selection, which used only the local config, exits 0.
    • Clean tree, with and without the local config: the new step exits 0.
  • Required contexts: a renamed-job fixture fails the new gate (exit 1) and passed the old one (exit 0).
  • squabble_gate_test.sh reports 81 passed and 0 failed.
  • mint_cleanup_test.sh, archetype_lock_merge_test.sh, repo_map_determinism_test.sh, run_proven_suite_test.sh, validate_workflows_test.sh and actions_lock_sha_refs_test.sh pass, the last with yq 4.53.3.
  • check-no-placeholders.sh passes, just --list parses with the new generator, and gen-repo-map.sh --worktree leaves the map unchanged.

Generated by Claude Code

hyperpolymath/standards moved to metadatastician/standards. A reusable
`uses:` does not follow the rename, and a hyperpolymath repository cannot
call a reusable in metadatastician's repository (rsr-template-repo#253
measured it: every caller failed at startup). Governance, Rust CI,
Hypatia and Secret Scanner had stopped loading ("workflow was not found").

Ports rsr-template-repo's CI from 60cedf1 to 8034fc9, its last green main
commit, by a three-way apply of the template's own diff over .github,
scripts, tests, .machine_readable, verification, build/container and the
K9 records, then the mint's self-name pass, as a mint would:
- self-contained workflows checking out metadatastician/standards@8e48b1c;
- squabble, proven-tests and fork-governance workflows; deed and K9
  validation move into Dogfood Gate;
- KYAML container config (data unchanged, rendered with this repo's
  values and canonicalised by kyaml-format.sh), K9 contract v1.0.0
  records, a JCS-canonical aibdp schema;
- CLAUDE.md regenerated by the arrival pack; the template's lock plus
  proofs.yml.

Not ported: the generator tests (use-this-template mint, template-pin
resolver, e2e mint tests), which exercise repo-init.just. Known gap: the
self-contained governance runs one policy step where the reusable ran 19
jobs (UUID v8 conformance, licence consistency, lockfile verify, ratchets,
JS runtimes); they return when standards is callable again.

tests/workflows/actions_lock_sha_refs_test.sh now checks every SHA-keyed
record in the lock against an exact table, keeps all its negative
controls, and refuses any reusable call into the moved repository.
ffi_strings_test.sh and container_kyaml_test.sh join mint-verbatim.txt:
they are token fixtures the placeholder gate otherwise rejects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
The proven-tests workflow's bench lane needs benches/baseline.json, which
the port left behind: it sits outside the paths ported in d8878e5. Ported
from rsr-template-repo 60cedf1..8034fc9 with template_bench.sh, the same
three-way apply. run-proven-suite.sh --bench now passes locally, both
bench lanes included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
The proven suite's FFI lane failed: tests/ffi_strings_test.sh names the
template's functions by filling `{{project}}` with test_project, so it only
works while main.zig still carries the token. In a minted repository the
functions are resource_algebra_*, and the appended tests named nothing.
The test now reads the export prefix from `export fn <prefix>_init()` after
filling the tokens and maps it to test_project, failing loudly when no
prefix is found. Checked on this tree and on the template's tokenised
main.zig: all six functions the tests call resolve.

src/interface/ffi/src/main.zig takes the template's 8034fc9 version (the
ownership docs and the string tests the lane exercises), with the mint's
values filled in as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
- build/just/repo-init.just: the template's generator at 8034fc9,
  verbatim as mint-verbatim.txt lists it, so it matches the mint scripts
  the port brought (file-list strip-instruction-blocks, the verbatim
  manifest, gen-repo-map --worktree).
- secret-scanner.yml: the estate gitleaks baseline always runs; a
  repository .gitleaks.toml adds a pass instead of replacing it.
- check-required-contexts.sh: a mapped context also needs a job whose
  check-run name is that context; squabble_gate_test names its fixture
  jobs and adds renamed-job and no-job mutants.
- main-estate-audit.yml: the SPDX step carries cicd-suite's warning, so
  it mirrors that gate at its pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LiQzWJdcPfRU6YMDGRG8Xi
main's b11b3bc has the same tree as #15's head 2d5f150, so conflicts
resolve to this branch. The CHANGELOG keeps #15's entry as merged and
records the review fixes in their own entry.

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

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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.

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review October 27, 2026 01:58
@hyperpolymath
hyperpolymath merged commit ea6e135 into main Oct 27, 2026
46 checks passed
@hyperpolymath
hyperpolymath deleted the claude/zealous-wozniak-2nherb branch October 27, 2026 01:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T02:04:41.271477Z f43456a 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f43456afa1

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread build/just/repo-init.just
Comment on lines +108 to +109
for _v in "${MINT_VERBATIM[@]}"; do
[ -f "$_v" ] || { echo "Error: $VERBATIM_LIST names $_v, which does not exist (stale entry)."; exit 1; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Align the verbatim manifest with the files actually ported

Every repo-init invocation from this commit exits here before reaching its prompts because the existing manifest names five files absent from the committed tree: scripts/resolve-template-pin.sh, tests/e2e/use_template_mint_test.sh, tests/workflows/self_name_pass_test.sh, tests/workflows/julia_library_test.sh, and tests/workflows/resolve_template_pin_test.sh. Port the required files or tailor the manifest to this repository; merely relaxing this validation is insufficient because the new provenance code later invokes the missing resolver directly.

Useful? React with 👍 / 👎.

Comment thread build/just/repo-init.just
Comment on lines +482 to +489
PACKAGE_UUID=$(python3 -c '
import hashlib, sys
pre = ("julia-package-identity:github.com/%s/%s" % (sys.argv[1], sys.argv[2])).encode()
b = bytearray(hashlib.sha256(pre).digest()[:16])
b[6] = (b[6] & 0x0F) | 0x80 # version 8
b[8] = (b[8] & 0x3F) | 0x80 # variant 10
h = b.hex()
print(f"{h[0:8]}-{h[8:12]}-{h[12:16]}-{h[16:20]}-{h[20:32]}")' "${OWNER_LC}" "${REPO}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the Julia mint acceptance test for UUIDv8

When the Julia mint path is exercised, the checked-in acceptance test does not test this new derivation: tests/e2e/julia_mint_test.sh lines 48-52 still generates a UUIDv5, while lines 114-120 explicitly assert version 5. Because that test independently simulates the recipe, it can remain green while repo-init emits a UUIDv8 and provides no regression coverage for the new preimage/version-bit logic; update it to derive and assert the same profile-C UUIDv8.

Useful? React with 👍 / 👎.

Comment thread build/just/repo-init.just
Comment on lines +650 to +651
case "$file" in
docs/decisions/*|CHANGELOG.md|*/CHANGELOG.md) continue ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude AsciiDoc changelogs from self-name rewriting

When this carried generator mints a child from resource-algebra, CHANGELOG.adoc is included in mint_files but this exclusion recognizes only Markdown changelogs. The subsequent dynamic self-name substitution therefore rewrites historical entries such as resource-algebra_chora.deed and resource-algebra.agda-lib to the child's name, while protected issue references remain unchanged, leaving the inherited history both corrupted and internally inconsistent. Include CHANGELOG.adoc (and nested AsciiDoc changelogs) in the wholesale changelog exclusion described by the preceding comment.

Useful? React with 👍 / 👎.

Comment thread build/just/repo-init.just
Comment on lines +479 to +484
if command -v bun >/dev/null 2>&1 && [ -f "${STANDARDS_UUID_V8_JS:-}" ]; then
PACKAGE_UUID=$(bun "${STANDARDS_UUID_V8_JS}" c julia-package-identity "github.com/${OWNER_LC}/${REPO}")
elif command -v python3 >/dev/null 2>&1; then
PACKAGE_UUID=$(python3 -c "import uuid; print(uuid.uuid5(uuid.UUID('${REPO_UUID}'), 'julia:${REPO}'))")
PACKAGE_UUID=$(python3 -c '
import hashlib, sys
pre = ("julia-package-identity:github.com/%s/%s" % (sys.argv[1], sys.argv[2])).encode()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the selected forge in the package UUID preimage

For a Julia mint where the operator selects a non-default forge such as GitLab or Codeberg, the repository UUID, website, deed, and push URL all use FORGE, but both new UUIDv8 implementations still hash a hard-coded github.com/<owner>/<repo> identity. Identically named repositories on different forges consequently receive the same package UUID, contrary to the recipe's identity rule that a repository hosted elsewhere derives a different UUID; construct the profile-C name from the selected forge in both the Bun and Python paths.

Useful? React with 👍 / 👎.

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