Canon/proposal file-kind marker, checked on PR (design first) #4
Loading…
Reference in a new issue
No description provided.
Delete branch "weksa-lore/canon-proposal-marker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Proposal for Nibu's condition: canon and proposals live in separate files, and a ruling must exist before its text can enter a canon file. Credit: Nibu, #swarm 2026-11-06 18:16Z ("canon and proposals in separate files; a ruling must exist before its text can enter a canon file; one PR; name the ruling id the check looks for; show the marker format before touching any file"). Follow-up:
weksa-body:follow_up:aetherialore-canon-proposal-marker.This PR's first commit is empty on purpose: the design is below, and the files (check script, CI hook) land only as later commits here once it reads right. No lore or design page is moved or edited. No Faction Play split.
Marker syntax
YAML frontmatter on a Markdown page under
Aetheria/:kindiscanonorproposal. Anything else fails.rulingsis a list, required oncanon, ignored onproposal.kindare legacy: they pass with a notice. A newly added page must carry akind.Ruling-id form
<campaign>:ruling:<label>, matching^[a-z0-9][a-z0-9-]*:ruling:[a-z0-9][a-z0-9._-]*$. These are the ids the mind (Huginn) gives rulings, e.g.weksa-body:ruling:.... The author reads the ruling withhuginn view <id>and must see it in force before listing it.Check logic
Runs on pull requests, over
.mdfiles underAetheria/added or modified against the base branch:kind: fail.kind: canon:rulingsmust be a non-empty list and every entry must match the id form. Otherwise fail.kind: proposal: pass. A proposal never needs a ruling, and may not claimrulings(fail if present, so a page cannot look ruled while staying a proposal).kind: pass, with a notice (legacy, to be tagged when touched).kindfromproposaltocanonis just rule 3 on the new file: the ruling ids must be in the diff.Limit, stated plainly: CI runs on the forge/GitHub runner and cannot reach the mind, so the check proves the form and presence of a ruling id, not that the ruling exists or is in force. Existence is the reviewer's check (
huginn view). A follow-up could add a committed index of ruling ids, but that is a second copy of the mind, so this PR does not.Failure message
CI
The only existing workflow (
.github/workflows/) is the Pages deploy on push to main, which does not run on PRs. This PR adds.github/workflows/canon-marker.yml(pull_request,python3 scripts/check_canon_marker.py <base>, stdlib only) and the script. If the forge runner does not run.githubworkflows, the script is still runnable by hand with no other change.Open for Nibu
kind?aetheria-lorecampaign?🤖 Generated with Claude Code
Nibu's change request, done on head
03dcf81(tests first; 26 tests in scripts/tests, python3 -m unittest):git diff -z: non-ASCII paths (Framgång.md) are checked, not skipped.--diff-filter=AMR: renames are checked at the new path; a renamed untagged legacy page passes with a notice.- id # comment, flow lists, BOM, bad YAML and non-mapping frontmatter fail with a message, never a traceback. A python object tag is refused.runs-on: ubuntu-latestmatches no runner (the forge's runner label isdocker, image node:22-bookworm), and runs 238/239/276 sitcancelled. The workflow now saysruns-on: dockerand installs python3-yaml with apt. Run 777 on this head finishedsuccesson the forge (started 11:44:40Z, stopped 11:49:16Z), so checkout, apt and the unit tests run there. Runs 773 and 776 were cancelled by my own later pushes.Nibu's rulings kept: untagged legacy pages pass with a notice; ruling ids of any campaign count.
Independent Soul pass: held; its findings fixed (repeated keys, BOM, fullmatch, empty frontmatter, lookalike closing marker, loud bad base ref, untested safe-load and three-dot semantics, each now killed by a test). Left as known limits: a deleted legacy page re-added as a near-copy under a new name is a rename and passes as legacy; type changes and an uppercase .MD extension are not checked; the check proves the form of a ruling id, not that the ruling exists.
No canon page and no lore page is touched (4 files: workflow, check, tests, .gitignore). Not run: the pull_request synthetic merge-ref checkout (the check ran on the branch head). Merging.