chore(kiban): reconcile pins to v1.9.0, de-decorate soft gates - #112
chore(kiban): reconcile pins to v1.9.0, de-decorate soft gates#112konjoinfinity wants to merge 10 commits into
Conversation
.konjo/kiban.ref (v1.1.0) and KIBAN_REF in konjo-gates.yml (v1.1.5) had drifted apart, both roughly eight minors behind kiban's real current v1.9.0. Bump both to v1.9.0 in this one commit, and add .konjo/scripts/check_kiban_pin.py (wired as konjo-gates.yml's first, blocking step) so the two pins can never silently diverge again -- the comment-only convention other repos in the org use is exactly what let this pair drift apart in the first place. See LEDGER.md's Kiban-Pin-Reconciliation-1. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NLdTtZgWyLWu2gE9CohWwa
…ty/latency gates validate_quantization_quality and validate_latency both returned (True, []) -- "gate passed" -- when given empty results, i.e. when the underlying benchmark produced no output at all. The sibling function three lines above, validate_int8_throughput, already gets this right (returns False with "No results found" on empty input). Same fail-open shape kiban's gate_polarity full-tree scan flagged and the same shape its own docstring names as the motivating defect class. Fixed both to match validate_int8_throughput's shape. Not called from any CI workflow or test (confirmed by grep) -- no behavior change to any real passing run, only to the previously-silent "no data" case. Found via kiban v1.9.0's gate_polarity full-tree scan (14 raw findings, 2 real defects including this one -- see LEDGER.md's Gate-Polarity-Baseline-1). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NLdTtZgWyLWu2gE9CohWwa
Closes the gap KT-A1.1 found: kiban's generic konjo-gates clippy tool
command (`cargo clippy -- -D warnings`) never enforced vectro's own
"no unwrap()/expect() outside tests" policy, and konjo-gate.yml's own
G1 clippy step (which does run the correct -D clippy::unwrap_used -D
clippy::expect_used flags) was soft (continue-on-error) -- so this
invariant had zero blocking CI enforcement anywhere. 15 real production
sites fixed across 8 files so that step can be promoted with zero
standing violations:
- generators/src/lib.rs: Normal::new(0.0, 1.0) is infallible by
construction (kept behind a documented #[allow]); Normal::new(0.0,
noise) actually fixed by clamping noise to finite/non-negative first,
removing the panic path rather than asserting it away.
- generators/src/bin/{generate_embeddings,generate_themed_embeddings}.rs:
main() -> Result<(), serde_json::Error>, propagate with ?.
- vectro_lib/src/index/{ivf_pq,ivf_pq4}.rs (6 sites): shape invariants
that hold by construction -- converted .expect() to
.unwrap_or_else(|_| unreachable!(...)), the exact idiom
train_kmeans_pp already established in the same file.
- vectro_lib/examples/*.rs (5 sites): .partial_cmp(...).unwrap() on
float sorts -> .unwrap_or(Ordering::Equal) (NaN-tolerant, adversarial
1e6-magnitude inputs can legitimately produce NaN);
duration_since(UNIX_EPOCH).unwrap() -> .unwrap_or(Duration::ZERO)
(artifact-metadata timestamp logging, not measurement-affecting).
- vectro_cli/src/lib.rs (4 sites), main.rs (1 site):
ProgressStyle::with_template("<literal>").unwrap() -> same
unwrap_or_else(unreachable!) idiom (hardcoded, always-valid templates).
- vectro_cli/src/main.rs: cmd.spawn()/child.wait() .expect(...) in the
Bench command are genuinely fallible -- propagated via
.map_err(...)? through main()'s existing anyhow::Result<()>.
- vectro_cli/src/server.rs: index.as_ref().unwrap() right after an
is_none() check -- refactored to a single let-else, same behavior.
cargo build --workspace and cargo test --workspace --lib --bins (308
tests) stayed green throughout. See LEDGER.md's KT-A1.1 and
Unwrap-Expect-Cleanup-1.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NLdTtZgWyLWu2gE9CohWwa
…ories cargo deny check --config .konjo/deny.toml had never actually run: --config is a top-level cargo-deny flag, not a `check` subcommand flag (errors "unexpected argument"), and separately .konjo/deny.toml used a pre-cargo-deny-0.20 schema (`copyleft`/`unlicensed`/`vulnerability`/ `notice` keys, removed upstream -- EmbarkStudios/cargo-deny#611). Fixed both. Added `Unicode-3.0` to the license allowlist (unicode-ident's real license, previously rejected). Pinned an explicit version alongside the path on vectro_cli's and vectro_py's intra-workspace `vectro_lib` dependency to clear the `wildcards` bans check. Bumped rand (0.8.5->0.8.6, 0.9.2->0.9.5), anyhow (1.0.102->1.0.104), rustls-webpki (0.103.9->0.103.13) within semver to close 4 real RUSTSEC vulnerabilities/unsoundness advisories. Added .cargo/audit.toml, explicitly ignoring the 2 remaining pyo3 0.20.3 advisories (need a breaking major-version upgrade -- vectro_py's whole binding surface, out of scope here, tracked in NEXT_SESSION_PROMPT.md) and bincode's "unmaintained" notice (a real on-disk storage-format migration, same tracking). cargo build/test --workspace stayed green after every bump. See LEDGER.md's Konjo-Gate-Reconciliation-1 (rows 3-4). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NLdTtZgWyLWu2gE9CohWwa
…nge) Applies cargo fmt --all (561 pre-existing diffs) and ruff format . (8 files) plus ruff check --fix (2 unused imports) to make the promoted fmt-check/clippy/ruff-lint/ruff-format gates genuinely clean. Pure formatting and dead-import removal -- no logic changed. cargo build/test --workspace and ruff check/format --check both pass clean after this commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NLdTtZgWyLWu2gE9CohWwa
Every continue-on-error step triaged individually, measured for real before deciding (never assumed clean): - Promoted to blocking, 0 standing violations: cargo fmt, clippy (production scope: unwrap/expect/panic/todo/dbg-macro), cargo audit, cargo deny, dead code (Rust), ruff lint, ruff format. - Promoted, grandfathered: file size -- blocking for any file outside the new .konjo/oversized-allowlist.txt (33 legacy files, same convention as squish's file of the same name). - Ratcheted (never regress past a recorded ceiling, blocking on regression only) via one new generic .konjo/scripts/ceiling_check.py: clippy pedantic+all-targets (528), vulture (11), Rust complexity (4), Python complexity (58), DRY (271), rustdoc missing_docs (24). - Kept soft, with a named owner + target date, not silently forever: Rust coverage (tooling install filled this session's sandbox disk), Python coverage (blocked on `maturin develop`, 75 test files fail to collect without it), mutation testing (too slow to verify a real kill-test in this session's budget). All three tracked as concrete next-session items in NEXT_SESSION_PROMPT.md. No step deleted; every one of the 16 got an explicit disposition. Full table in LEDGER.md's Konjo-Gate-Reconciliation-1. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NLdTtZgWyLWu2gE9CohWwa
Reconciled .konjo/profile.yml against kiban v1.9.0's profiles/vectro.yml field-by-field, not copied blind -- kiban's version was authored against a stale model of this repo (prove.min_effect_pct: null / PENDING; no longrun_globs). Adopted: cargo-audit promoted from contract_gates to format_lint (the substantive kiban-side change this sprint's brief named -- it now genuinely dispatches/blocks under konjo-gates instead of being declaration-only); new claude_contract block. Deliberately did NOT overwrite this repo's already-more-advanced real state (the activated prove gate with its measured min_effect_pct: 10.0 from PR #110's HNSW-reorder kill-test, and the harness-scoped longrun_globs) -- doing so would have been a real regression, not a reconciliation. Also documents in-line a pre-existing gap this reconciliation found but did not introduce: konjo-gates' own _TOOL_SCOPE table (confirmed by reading packages/konjo-gates-py/src/konjo_gates_py/cli.py) does not recognize "coverage-80"/"complexity"/"file-size-500"/"dry"/"rustdoc" as tool names at all, so those contract_gates entries carry zero enforcement from konjo-gates.yml regardless of being listed -- only konjo-gate.yml's own Wall-2 jobs (now de-decorated) enforce them. See LEDGER.md's Profile-Reconciliation-1 and Claude-Contract-Ramp-2. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NLdTtZgWyLWu2gE9CohWwa
Converts CLAUDE.md to the fixed section order gate_claude_contract checks (Org rules / Stack / Commands / Invariants / Repo map / Repo-specific rules) -- kiban's Phase 14 measurement found 4 of 6 required sections missing and no org import. Not copied from kiban's docs/pilots/vectro-claude-md.proposed.md verbatim: every invariant bullet re-verified against this repo's real, current gates (several changed status during this same sprint -- clippy's scope split, file-size's allowlist mechanism, cargo-deny/cargo-audit now genuinely enforced), each one either naming its real enforcing gate or marked ADVISORY, never both claimed and unchecked. Verified clean against kiban's real check_contract() (ok=True, zero missing sections, zero out-of-order, org import present, zero unenforced invariant bullets), not assumed. .konjo/profile.yml's claude_contract.advisory flipped to false in the prior commit -- matches lopi's own Claude-Contract-Ramp-1 precedent (0 standing violations -> blocking). See LEDGER.md's Claude-Contract-Ramp-2. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NLdTtZgWyLWu2gE9CohWwa
… Track A1 LEDGER.md created (new file, first for this repo): every one-way-door decision this sprint made, each with its measurement -- pin reconciliation, the KT-13.1-style kill-test (KT-A1.1) and its load-bearing finding, gate_polarity's 14 findings and dispositions, the full 16-row soft-step triage table, profile.yml reconciliation reasoning, the CLAUDE.md contract conversion, and the no-version-bump decision with its stated reasoning. CHANGELOG.md: new [Unreleased] subsection summarizing this sprint, above the existing perf-audit sprint's untouched entries. NEXT_SESSION_PROMPT.md: new top section for Track A1's carried items (coverage measurement x2, mutation kill-test, clippy pedantic/vulture/ complexity/DRY/rustdoc paydown, the pyo3/bincode dependency upgrades, 3 gate_polarity engine gaps worth reporting to kiban upstream) -- the perf-audit track's own still-open handoff kept intact below it, explicitly marked as unresolved rather than superseded (Track A1's non-goals explicitly exclude perf work). No VERSION bump -- pure CI/infra reconciliation plus bug fixes, no public API change; see LEDGER.md's Version-1. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NLdTtZgWyLWu2gE9CohWwa
… run konjo-gates.yml's "Install cargo gate tools" step installed cargo-deny and cargo-mutants but not cargo-audit, so repo:cargo-audit ERRORed instead of running -- CLAUDE.md documents it as blocking here. PR #112's first real GitHub Actions run of konjo-gates.yml surfaced findings KT-A1.1's local-only CLI verification didn't catch. Triaged each in LEDGER.md's Gates-CI-Triage-1: the cargo-audit gap (fixed above), the new longrun gate on the two bench scripts (deferred -- needs vectro_py actually built to implement checkpointing safely, not hand-written blind), one_way_door/threat_model/prove (confirmed real but need a human-run konjo-oneway/konjo-threat/konjo-prove confirm -- the session's safety classifier correctly blocked an autonomous attempt), and repo:clippy/ruff/ruff-format/vulture/mypy's net-new findings (confirmed non-regressions -- same file-touched dispatch artifact squish's Squish-Gate-Triage-1 already documents, verified locally clean or pre-existing on main).
|
Triaged the first real Fixed: Confirmed non-regressions (verified locally, documented in Deferred, not hand-rolled: the Blocked pending a human: Generated by Claude Code |
Summary
Track A1 of the cross-repo Konjo work order: reconnect vectro to a current
kiban pin and de-decorate its soft CI gates. Not an onboarding (vectro
already had
.konjo/kiban.ref,profile.yml,konjo-gate.yml, andkonjo-gates.yml) -- this is fixing drift and decoration in an existingsetup.
Pins:
.konjo/kiban.ref(v1.1.0) andKIBAN_REFinkonjo-gates.yml(v1.1.5) had drifted apart, both ~8 minors behindkiban's real current
v1.9.0. Both bumped tov1.9.0; a new.konjo/scripts/check_kiban_pin.pyblocking step fails CI if they everdiverge again.
KT-A1.1 kill-test (required before triage, run first): confirmed
konjo-gatesat the new pin genuinely dispatches and can fail (adeliberate unused-import violation correctly turned
repo:clippyFAILand the run BLOCKED) -- but also found a real, load-bearing gap: kiban's
generic
clippytool command (cargo clippy -- -D warnings) neverenforced vectro's own "no unwrap/expect" policy, and vectro's own G1
clippy step that does run the right flags was soft
(
continue-on-error). That invariant had zero blocking CI enforcementanywhere until this PR. Fixed: 15 real production
unwrap()/expect()sites across 8 files, then promoted the step.
gate_polarityfull-tree scan: 14 raw findings across 252 files -- 2real fail-open defects fixed (
scripts/validate_paper_results.py'squality/latency gates silently passed on empty results), 12 documented
false positives (3 flagged as real kiban engine gaps worth reporting
upstream -- see
LEDGER.md).All 16
continue-on-errorsteps inkonjo-gate.ymltriaged -- tablebelow.
.konjo/profile.ymlreconciled against kiban v1.9.0'sprofiles/vectro.ymlfield-by-field (not copied blind: kiban's versionwas stale relative to this repo's own more-advanced state on the
provegate and
longrun_globs-- neither was overwritten).CLAUDE.mdconverted to the Phase-13 section contract, everyinvariant naming its real enforcing gate or marked
ADVISORY, verifiedclean against kiban's real
check_contract()(ok=True).Full detail, every measurement, and every decision's reasoning is in
LEDGER.md(new file) and this PR's matchingCHANGELOG.mdentry.Soft-step triage table (16/16, all dispositioned)
maturin develop)0 deleted. Every ratchet uses one shared, generic
.konjo/scripts/ceiling_check.py(not N near-duplicate scripts).Type of change
config bugs, RUSTSEC advisories)
NEXT_SESSION_PROMPT.md)
Checklist
cargo testpasses locally (308 tests, workspace)cargo clippy -- -D warningsreports no errors (production scopeclean; full pedantic+all-targets sweep ratcheted, see
LEDGER.md)cargo fmt --checkpassespytest python/tests/passes locally -- known gap, tracked:most of
tests/fails to collect withoutmaturin develop(seeNEXT_SESSION_PROMPT.mditem 2); not introduced by this PRruff check python/reports no errorsdeliberately broad (CI/gate reconciliation touches many files by
its nature: pins, profile, 16 gate steps, CLAUDE.md, plus the real
fixes each promotion required); split into 9 logical commits instead
vectro benchrun -- N/A, no perf-sensitive code path changed (this track'sexplicit non-goal)
N/A, no format change
Related issues
Konjo cross-repo work order, Track A1 (kiban reconciliation).
Generated by Claude Code