Skip to content

ci: make public-hygiene-lint green - #6

Merged
MattJackson merged 2 commits into
mainfrom
ci/public-hygiene-green
Aug 9, 2026
Merged

ci: make public-hygiene-lint green#6
MattJackson merged 2 commits into
mainfrom
ci/public-hygiene-green

Conversation

@MattJackson

Copy link
Copy Markdown
Contributor

public-hygiene-lint was RED on main in this repo. Every hit is fixed by rewriting the text to
state the BEHAVIOUR rather than our internal process. No allow markers were added anywhere in
this change: a blanket allow would turn the gate into decoration.

Hits found on main, and the decision for each

  • .github/scripts/next-version.sh + .github/workflows/release-selftest.yml [internal-issue-id]
    cited an internal guard id. REWRITTEN: id dropped.
  • auth-oidc-plugin/tests/e2e.rs [mutation-testing] named the QA harness as a build-shape example.
    REWRITTEN: release-check.sh's phase is the concrete case and it is kept.
  • auth-oidc-plugin/tests/e2e.rs [personal-identifier] attributed the test to a named individual
    and quoted a private request. REWRITTEN to state what the test proves.

Red before green

Same invocation CI uses. Output is ASCII-folded for this description; the runs are verbatim
otherwise.

Before (on main)

$ python3 busbarAI/scripts/public-hygiene-lint.py --root .
== public-hygiene: what a customer reads, in . ==
  scanned 25 file(s) via git ls-files; 11 rules applied

  [internal-issue-id] internal issue / task / audit-round identifier - 2 hit(s)
      why: cites a tracker or audit artifact the reader cannot open; `task #141` and `R27 #8` shipped inside operator-facing API documentation
      .github/scripts/next-version.sh:5: # release automation can't silently rot (guard #135.8). Prints "v<MAJOR>.<MINOR>.<PATCH>" to stdout.
      .github/workflows/release-selftest.yml:1: # CI self-test for the release-on-upstream version-compute logic (guard #135.8).

  [mutation-testing] mutation-testing workflow leaked into shipped prose - 1 hit(s)
      why: names an internal QA tool and the campaign it was run in; the shipped comment should state the invariant the test protects, not the harness that found the gap
      auth-oidc-plugin/tests/e2e.rs:25: /// `release-check.sh`'s Phase 4 runs, and what cargo-mutants runs) does NOT uplift the cdylib to

  [personal-identifier] a named individual addressed in source - 1 hit(s)
      why: a shipped file naming a person and what they asked for reads as a private conversation the customer was accidentally shown
      auth-oidc-plugin/tests/e2e.rs:349: /// THE REAL END-TO-END PROOF Matthew asked for by name: "we called oidc... for EVERY plugin." Not a

== result ==
  25 public file(s) scanned against 11 rules - 4 hit(s), 0 allowed
  public-hygiene-lint FAILED
  These lines describe how the software was BUILT, not what it does, in files a
  customer can read. Rewrite the text to state the behaviour or the invariant; if a
  line is genuinely legitimate, mark it:
    # public-hygiene-lint: allow - <why this text belongs in a public file>

After (this branch)

$ python3 busbarAI/scripts/public-hygiene-lint.py --root .
== public-hygiene: what a customer reads, in . ==
  scanned 25 file(s) via git ls-files; 11 rules applied

== result ==
  25 public file(s) scanned against 11 rules - 0 hit(s), 0 allowed
  public-hygiene-lint passed

Matthew Jackson and others added 2 commits August 8, 2026 17:22
The public-hygiene gate flags text in customer-readable files that
describes how the software was BUILT rather than what it DOES. Every hit
in this repo is rewritten to state the behaviour or the invariant; no
allow markers are added, so the gate keeps its teeth.
…r, and stop discarding busbar's output

The `install_oidc_plugin_via_admin_api_and_authenticate` e2e test failed on
every run with `busbar exited early during admin-readiness poll: exit status:
1`. The reason was never visible because the harness spawned busbar with
`Stdio::null()` on both streams, so busbar's one-line explanation went to the
floor and the test reported only an exit code.

The explanation was that both fixture configs still used the 1.5.0 INLINE
identity-provider form (`auth.admin_auth: [{ admin-tokens: {...} }]`,
`auth.chain: [{ oidc: { settings: ... } }]`). busbar 1.5.3 retired that form
along with `auth.methods:`/`auth.modules:` and refuses to boot on it — and
this repo's own `.busbar-ref` pins 1.5.3, so the fixture was behind the
grammar this plugin ships against. Both configs now define each provider once
under the top-level `identity-providers:` map and reference it by bare name,
which is what an operator on 1.5.3 must write.

Capturing the child's output is the fix that matters most: an early exit or a
readiness timeout now reports what busbar actually said, so the next config
break is a one-line diagnosis instead of an exit code. Both streams are
drained on background threads rather than read at panic time, because an
unread pipe fills after a page or two and would block the very boot the test
is waiting on.

The same retired grammar was documented in README.md and in the two crates'
module docs, telling operators to write a config that no longer boots; those
now show the `identity-providers:` + bare-name shape and point at
`--migrate-config`.

Separately, ci.yml passed `busbar_ref: ${{ github.ref_name }}`, which on a
`pull_request` event is `<number>/merge` rather than a branch name. Core's
reusable workflow could not resolve it and silently fell back to `busbar@dev`
on every PR, so no PR ever tested against the branch it targets.
`${{ github.base_ref || github.ref_name }}` says what was meant.
@MattJackson
MattJackson force-pushed the ci/public-hygiene-green branch from c440c6b to d9f9573 Compare August 9, 2026 00:23
@MattJackson
MattJackson merged commit 942dc9e into main Aug 9, 2026
2 checks passed
@MattJackson
MattJackson deleted the ci/public-hygiene-green branch August 9, 2026 01:57
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.

1 participant