Repository navigation
feat(yaml): kyaml-format.sh, a KYAML formatter with --check (#1022) - #1117
Merged
Merged
Conversation
KYAML adoption step 3. The rewriter is `yq -p yaml -o kyaml '.'` verbatim, the one rewriter the step-2 comment proof (#1021) covers, so no post-processing is added. --check exits 1 on drift. A file that does not parse, has no final newline, or would change its parsed data is REFUSED (exit 2), never judged clean. The suite has 17 controls. Each accepting case has a rejecting twin (block YAML, hand-mangled KYAML, unparseable, newline-less, missing). Three formatter mutants are killed: --check never drifts, refusals not counted, final-newline guard removed. YAML-POLICY §5 records the step, and records why it is not yet a gate: gh actions-lock v0.1.6 is blind to `uses:` inside a KYAML workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W5CoaksP2Bg21HpDCgFgwS
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
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. Comment |
hyperpolymath
enabled auto-merge (squash)
October 1, 2026 22:18
5 tasks
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KYAML adoption step 3 (
3-practice/YAML-POLICY.adoc§5). Closes #1022.What
scripts/kyaml-format.sh [--check] FILE...yq -p yaml -o kyaml '.', verbatim. That is the one rewriter KYAML step 2/6 — comment-preservation proof (shared by Y-2 and Y-3) #1021's proof covers, so nothing is post-processed.--checkexits 1 on drift and rewrites nothing.#1022 acceptance criteria
--check→ all 56 KYAML--checkexits non-zero on driftbun prove.js .github/workflows/*.ymlon13b872c1: kyaml arm PASS: 2245/2245 comments preserved, 0 moved, 0 dropped, idempotent 57/57yq -o json 'sort_keys(..)'Two findings this surfaced
gh actions-lockv0.1.6 (github/gh-actions-lock) does not seeuses:inside a KYAML workflow. I planted the unlocked SHA1111…in KYAMLprovisioning-check-reusable.yml:--verify-localstayedvalid: truewith no finding. The same plant in blockreadme-derive-reusable.ymlgavevalid: false,stale(positive control). Converting a workflow would therefore silently drop it from lock verification. The single-file workflow pilot is not shipped, and YAML-POLICY now records why. This bears directly on the KYAML step 4/6 — decide KYAML scope on the evidence (owner ruling) #1023 scope question for workflows.k9-contractile.ymlthe lastrun: |body ends at EOF with no line break. go-yaml (yq) and eemeli/yaml disagree on its trailing\n; that is the onedata-equal 56/57in the proof. The formatter refuses such files rather than pick a reading.Every
tests/*.shandscripts/tests/*.shpasses locally (67/67). Docstring scan: 5/5 functions documented.🤖 Generated with Claude Code
https://claude.ai/code/session_01W5CoaksP2Bg21HpDCgFgwS