Skip to content

C4 follow-ons: docs cross-ref audit + persona-name sweep + prettier hooks race fix (3 of 4 from #353)#361

Open
davidlabianca wants to merge 3 commits into
cosai-oasis:mainfrom
davidlabianca:feature/353-docs-tooling-followons
Open

C4 follow-ons: docs cross-ref audit + persona-name sweep + prettier hooks race fix (3 of 4 from #353)#361
davidlabianca wants to merge 3 commits into
cosai-oasis:mainfrom
davidlabianca:feature/353-docs-tooling-followons

Conversation

@davidlabianca
Copy link
Copy Markdown
Contributor

C4 follow-ons: docs cross-ref audit + persona-name sweep + prettier hooks race fix (3 of 4 from #353)

Closes #355
Closes #356
Closes #357

Not closed in this PR: #354 (pulled into the ADR-028 tokenizer-re-engineering track) + #353 umbrella (stays open until #354 lands).

Why three, not four

The #353 umbrella has 4 sub-issues (#354 / #355 / #356 / #357). The first 3 are mechanical infrastructure changes with disjoint files; the 4th (#354 prose-linter enforcement) revealed an architectural-shape problem (detection-by-indexing on a flat token stream — a tree-as-list pattern that won't generalize to deeper ADR-017 D1 rules).

Rather than ship a known-brittle pattern with one more patch, the maintainer pulled #354 into a structural-redesign track.

This PR ships the 3 green sub-issues now. #353 umbrella stays open until #354 lands on its own track.


Commit walk (3 commits)

# SHA Sub-issue One-liner
1 049b63e #355 ADR-026 D4c (task 1.1.5) post-#345 docs cross-ref audit (21 cross-refs ↔ 8 templates / 6 contributing guides verified; inline drift fix AI ProviderAI Partner in 2 persona templates for ISO 22989 role correctness)
2 6d35d86 #356 ADR-021 persona-name alignment sweep — README:30 + new_persona.template.yml:23 enumeration + new_persona.template.yml:120 example + update_persona.template.yml:60 narrative-example (canonicalize to AI Platform Provider / AI Model Serving / Agentic Platform and Framework Providers / AI System Users)
3 0dcb19d #357 require_serial: true on both prettier-yaml AND prettier-site-assets to close the .git/index.lock self-race (per-file git add + parallel workers); drift-prevention tests via new TestRequireSerialPrettierHooks class; empirical proof: 3× consecutive pre-commit run --all-files zero failures

Reviewer focus

All 3 changes are mechanical with high test coverage. Suggested per-commit walk-through:


Gates (all green at branch tip 0dcb19d)

ADR cross-refs

davidlabianca and others added 3 commits May 26, 2026 22:58
…cross-reference audit + any inline drift fixes — closes cosai-oasis#355

All 21 cross-references across the 8 templates verified against the 6 contributing-guide pages; helper text and guides agree on every solicited convention. One trivial drift fixed inline: the iso-22989 placeholder role label in `new_persona.template.yml` and `update_persona.template.yml` was `AI Provider`, which is not a real ISO 22989 role — corrected to `AI Partner`, matching both the template's own helper text and the FM-style-guide §ISO 22989 role-family list.

Co-authored-by: AI Assistant <ai-assistant@coalitionforsecureai.org>
…emplates' enumerations) to ADR-021's 8 active personas — closes cosai-oasis#356

Sweeps onboarding-facing copy for ADR-021 canonical-name alignment: README:30 (legacy "Model Creator and Model Consumer" line), new_persona.template.yml:23 (explicit 8-persona list — was using "Platform Provider"/"Model Serving"/"Agentic Provider"/"End User" short forms), new_persona.template.yml:120 ("End User" in the Relationship-to-Existing-Personas e.g.-list), and update_persona.template.yml:60 ("Model Serving" → "AI Model Serving" in the title-rename example). risk-map/yaml/personas.yaml is the source of truth for the 8 active titles. Rendered .github/ISSUE_TEMPLATE/{new,update}_persona.yml regenerate via the pre-commit hook.

Co-authored-by: AI Assistant <ai-assistant@coalitionforsecureai.org>
…ests covering both prettier hooks to fix the .git/index.lock race — closes cosai-oasis#357

Root cause: scripts/hooks/precommit/prettier_yaml.py does a per-file `git add` after formatting; under `pre-commit run --all-files` the hook batches into parallel invocations whose concurrent `git add` calls race on .git/index.lock (exit 128, reliably reproducible). require_serial: true collapses the hook into one serial invocation, eliminating the race — empirically verified across 3 consecutive --all-files runs post-fix. prettier-site-assets already carried the property at parity; this commit adds it to prettier-yaml. A new TestRequireSerialPrettierHooks class (scripts/hooks/tests/test_precommit_hook_install.py) asserts the property on both hooks plus the membership invariant, so a future removal from either hook fails CI.

Co-authored-by: AI Assistant <ai-assistant@coalitionforsecureai.org>
@davidlabianca davidlabianca self-assigned this May 27, 2026
@davidlabianca davidlabianca added documentation Improvements or additions to documentation tech-debt pre-commit labels May 27, 2026
@davidlabianca davidlabianca marked this pull request as ready for review May 27, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pre-commit tech-debt

Projects

None yet

1 participant