Skip to content

DO-NOT-MERGE · Scrub internal tracker IDs from shipped source + CI workflow, and tighten the sweep#222

Open
Antawari wants to merge 1 commit into
quality/go-greenfrom
catrina/2026-06-12/bon-1624-bonfire-public-scrub-internal-ids-from-shipped-code
Open

DO-NOT-MERGE · Scrub internal tracker IDs from shipped source + CI workflow, and tighten the sweep#222
Antawari wants to merge 1 commit into
quality/go-greenfrom
catrina/2026-06-12/bon-1624-bonfire-public-scrub-internal-ids-from-shipped-code

Conversation

@Antawari

Copy link
Copy Markdown
Contributor

What

This is a public tree, yet internal tracker IDs (BON-NNN) had leaked into shipped code and CI, and the existing leak-sweep test allowlisted them rather than forbidding them. This PR cleans all three surfaces and tightens the gate so the leak cannot recur.

  • src/bonfire/analysis/models.py — rewrote the seven tracker-bearing docstrings/comments into neutral descriptive prose (e.g. Frozen budget of Cartographer tunables (BON-226 §5). -> Frozen budget of Cartographer tunables.; Gzip-compressed JSON — BON-231 Wave 2b cache seam. -> Gzip-compressed JSON cache seam.). Comments/docstrings only — no identifiers, field names, defaults, validators, or executable code changed. Model behavior is byte-identical.
  • .github/workflows/smoke.yml — dropped tracker IDs + internal milestone scaffolding (scout report, comment hash) from workflow comments. The gate steps themselves are unchanged; still valid YAML.
  • tests/unit/test_no_bon_ref_in_src_sweep.py — set _ALLOWLIST = frozenset() so any future BON-NNN in src/ fails the sweep instead of being permitted, and scrubbed the tracker refs + workshop vocabulary from the test's own docstrings/comments.

docs/ is intentionally out of scope for this unit (it is the larger separate decision).

Why

A public repo must never ship internal tracker IDs. The previous allowlist made the leak a permanent fixture; emptying it converts the sweep from a recorder of known leaks into a true gate.

How to verify (exact commands)

cd <repo-root>
python -m venv /tmp/bpv2 && /tmp/bpv2/bin/pip -q install pytest pydantic ruff
PYTHONPATH=src /tmp/bpv2/bin/pytest tests/unit/test_no_bon_ref_in_src_sweep.py -q
PYTHONPATH=src /tmp/bpv2/bin/pytest tests/unit/test_analysis_models.py tests/unit/test_analysis_schema.py tests/unit/test_analysis_fingerprint.py -q
/tmp/bpv2/bin/ruff check src/ tests/
/tmp/bpv2/bin/ruff format --check src/ tests/
grep -rnE 'BON-[0-9]' src/ .github/workflows/smoke.yml tests/unit/test_no_bon_ref_in_src_sweep.py && echo 'LEAK REMAINS' || echo 'SRC+CI CLEAN'

TDD trail: with the allowlist emptied and models.py still dirty, the sweep went RED (7 offenders); after the scrub it is GREEN.

Honest gate results (run inside the worktree)

  • Sweep test_no_bon_ref_in_src_sweep.py2 passed (test_allowlist_entries_still_resolve passes trivially on the empty allowlist).
  • Analysis-model suites (test_analysis_models + test_analysis_schema + test_analysis_fingerprint) — 35 passed (behavior byte-identical).
  • ruff check src/ tests/All checks passed.
  • ruff format --check src/ tests/311 files already formatted.
  • smoke.ymlvalid YAML (PyYAML safe_load, job smoke).
  • grep -rnE 'BON-[0-9]' over src/ + smoke.yml + the sweep test — no matches (clean).

Note: the broader tests/unit suite has pre-existing collection errors in this minimal venv (missing runtime deps unrelated to this change); the targeted suites above run clean.

Closes BON-1624

operator merges — do not auto-merge

This is a public tree, so internal tracker IDs must never ship in
source or CI. Three surfaces are cleaned and the leak gate is tightened
so the leak cannot recur:

- src/bonfire/analysis/models.py: rewrite the seven tracker-bearing
  docstrings/comments into neutral descriptive prose. Comments and
  docstrings only — no identifiers, field names, defaults, validators,
  or executable code changed; model behavior is byte-identical (35
  analysis-model tests still pass).
- .github/workflows/smoke.yml: drop tracker IDs and internal milestone
  scaffolding from the workflow comments; the gate steps are unchanged.
- tests/unit/test_no_bon_ref_in_src_sweep.py: set the allowlist to an
  empty frozenset so any future tracker ID in src/ fails the sweep
  instead of being permitted, and scrub the tracker refs and workshop
  vocabulary from the test's own docstrings and comments.

Gates from inside the worktree: sweep + analysis-model suites green,
ruff check + ruff format --check clean, smoke.yml valid YAML, and a
grep for the tracker-ID shape across src/, the CI workflow, and the
sweep test finds nothing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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