Repository navigation
Description
Overview
wiki-currency was red on main and was fixed on 2026-08-24 by regenerating wiki/core/api_audit_baseline.json (#24, PR #23). That fix is correct but temporary, and the reason is structural.
--check-version compares a hash of the entire public API surface of autonerves, autoarray, autofit, autocti and autocti.plot against a committed baseline. The assistant documents almost none of that surface. The drift that turned the repo red was 12 additions and 2 removals across autoarray and autofit — and not one of those 14 symbols is cited anywhere in wiki/, skills/ or modes/. --scope all, which audits exactly the symbols the docs do cite, reported clean throughout.
The workflow installs the stack from the libraries' main source clones, so the clock is every merge into autofit or autoarray main that touches an __init__ export. The new baseline should be expected to rot within weeks. A check that goes red on a schedule nobody controls, for reasons that never affect the thing it gates, trains reviewers to ignore it — and this repo's PRs already opened red for over a month.
The decision (made deliberately, per the prompt)
Option 1: gate on removals; additions become informational. A symbol disappearing can break a doc; a symbol appearing cannot.
Option 2 (demote --check-version entirely and let --scope all be the only gate) was the leaner candidate and was rejected for one reason: it throws away the whole-surface tripwire, and there is a cheaper way to get the noise down that also fixes a second, worse problem.
The fact that decided it
The baseline stores only a hash and a symbol count — not the symbol names:
"autofit": { "hash": "d540d084…", "n_symbols": 160 }So --check-version today cannot tell an addition from a removal, and a red prints exactly this:
[drift] API DRIFT vs baseline (baseline generated 2026-07-23):
- public API surface changed: autoarray, autofit
That is undiagnosable. Reconstructing what actually moved is what cost the last session real work: worktrees had to be created at the baseline's own commits, the libraries installed from them, and the symbol sets diffed by hand.
Recording the sorted names — all 449 across the five modules, roughly 15 KB — fixes the noise and makes every future red self-diagnosing. That combination is worth more than the simplification option 2 buys.
Plan
- Baseline gains a
symbolslist per module, alongside the existinghashandn_symbols. --check-versioncomputes the real diff and prints+added/-removedper module.- Exit 0 when every change is an addition; exit 1 on any removal. Additions still print, labelled informational.
- Stay backward-compatible with a baseline that predates
symbols: fall back to the hash comparison and say so, rather than crashing or silently passing. - Document the whole story in
skills/ac_audit_skill_apis.md— including when regenerating the baseline is the right response and when it is papering over.
The caveat, stated plainly
This would not have prevented the red that started all this. Both removed symbols (TransformerNUFFTPyNUFFT, autofit.database) were uncited, so a removals-only gate still goes red on them. What changes is that the red now arrives with the two names attached, and the twelve irrelevant additions no longer trigger it at all. Narrowing further to removals of cited symbols is what --scope all already computes, so putting a second mechanism on that question was rejected as duplication.
Detailed implementation plan
Affected Repositories
- autocti_assistant (primary, and the only repo changed)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./autocti_assistant | main | clean |
Suggested branch: feature/wiki-currency-check-version-gate
Implementation Steps
autoassistant/audit_skill_apis.py→compute_baseline— record"symbols": _public_names(mod)per module._public_namesis already sorted, and_api_hashalready hashes exactly that list, so the hash stays consistent with the names by construction (no second enumeration).check_version— replace the boolean hash comparison with a per-module set diff. Print+ added/- removed. Gate:return 1iff any module lost a symbol.- Legacy-baseline path — a baseline with no
symbolskey cannot support a diff. Fall back to the current hash comparison, print that the baseline predates symbol recording, and say--write-baselineupgrades it. Never silently pass. skills/ac_audit_skill_apis.md— document the gate's meaning, the regenerate-or-investigate decision, and the--scope alldivision of labour.- Tests — additions-only exits 0; a removal exits 1; a legacy baseline still works; the printed diff names the right symbols.
Two call sites to keep working
.github/workflows/wiki-currency.yml— the uniformrun()helper fails the job on any non-zero exit, so the exit-code change is the whole mechanism there; no workflow edit is needed.AGENTS.md"Session start" — the same command, where exit 1 means "genuine drift: recommend the pinned version or an audit". Its prose needs to match the narrowed meaning.
Key Files
autoassistant/audit_skill_apis.py—compute_baseline,check_versionwiki/core/api_audit_baseline.json— regenerated withsymbolsskills/ac_audit_skill_apis.md— the documented storyAGENTS.md— session-start prose
Note
.claude/skills/*.md are symlinks into skills/ (git mode 120000), so one edit covers both surfaces.
Explicitly rejected
Pinning to a released stack. Considered and rejected on 2026-08-24: autocti's PyPI release is the pre-resurrection 2024.11.13.2, so pinning would grade today's docs against an API predating the work they describe — vacuously green, which is worse than noisily red. The workflow's own install-step comment says as much.
Original Prompt
Click to expand starting prompt
wiki-currency's --check-version gate rots on every library main merge
Type: maintenance
Target: autocti_assistant
Repos:
- @autocti_assistant
Difficulty: medium
Autonomy: supervised
Priority: normal
Status: formalised
Filed: 2026-08-24
--check-version compares a hash of the entire public API surface of
autonerves, autoarray, autofit, autocti and autocti.plot against a
committed baseline. The assistant documents almost none of that surface.
Measured at the time of the fix — the drift that turned the repo red was:
autoarray 120 -> 121 + InterpolatorDelaunayNN, validate - TransformerNUFFTPyNUFFT
autofit 149 -> 159 + AbstractClipper, AbstractScaler, ApproxUpdater,
ClipperNone, ClipperPriorBox, DynamicUpdater,
FactorUpdater, NSS, ScalerNone, ScalerPriorWidth,
SimplerUpdater
- database
Not one of those 14 symbols is cited anywhere in wiki/, skills/ or
modes/.
The decision to make
Two coherent options; this task is to choose one deliberately and implement
it, not to guess:
- Gate
--check-versionon removals only. A symbol disappearing can break
a doc; a symbol appearing cannot. Report additions as informational, fail
only on removals from the surface. - Accept that
--scope allsubsumes it as a gate. Demote--check-version
to informational, and let--scope allbe the thing that can fail the
workflow.
Whichever is chosen, the baseline-regeneration story should be documented in
skills/ac_audit_skill_apis.md so the next person hitting a red knows whether
regenerating is the right response or a papering-over.
Do not "fix" this by pinning to a released stack
Already considered and rejected on 2026-08-24.
Context worth reading first
PyAutoMind/complete/2026/08/wiki-currency-baseline-drift.md
Activity
Jammy2211 commentedon Aug 24, 2026
Shipped
PR #26 merged (
de4ac2d).wiki-currencyandboundaryboth green on the PR.Option 1 chosen — gate on removals — and the fact that decided it against the leaner option 2 is that the baseline stored only a hash and a count, never the names. A red printed exactly
public API surface changed: autoarray, autofit, so reconstructing what moved meant worktrees at the baseline's own commits and a hand diff. Recording 449 names (12 KB) kills the noise and makes every future red self-diagnosing — worth more than the simplification option 2 buys.symbolsper module;_api_hashsplit so hash and names derive from one sorted list.--scope allalready computes that, and two mechanisms answering one question is how they drift apart.The regenerated baseline is a pure schema upgrade. Every per-module hash and every version is byte-identical to the one PR #23 wrote — so it records no API change, only the names behind the hashes already there.
--check-versionwas already clean against today'smainbefore regenerating, which independently confirms #23's fix is still valid.The caveat, restated: this would not have prevented the original red. Both removed symbols were uncited, so a removals-only gate still goes red on them. What changes is that the red now arrives with the names attached, and the twelve irrelevant additions no longer trigger it.
One scope note.
skills/ac_audit_skill_apis.md— where the task asked to document the regeneration story — did not exist. It was an unfinished clone item inPENDING.md, withAGENTS.md(×3),modes/maintainer.mdandskills/ac_setup_environment.mdall linking to it: five broken links. Written here fromaudit_skill_apis.pyitself rather than adapted from the lensing sibling, registered inskills/README.md, symlinked into.claude/skills/(mode120000), and bothPENDING.mdentries ticked.Verified against the real CTI stack (autonerves/autoarray/autofit
2026.8.17.1from sourcemain, autocti2024.11.13.2, arcticpy 2.6): all five checks pass —--check-versionclean,--scope all31/31 symbols,--lint-idioms52 files clean,--check-provenance0 errors,--check-citations0 missing. Unit tests: 11/11 intest_check_version.py, and the full-suite failure set is identical tomain(13 pre-existing "no installed stack" failures, none added).Generated by Claude Code