Vijay Janapa Reddi
|
4aae33c036
|
test+ci: green test matrix + lint-clean + real vitest + committed lockfile
LOCAL TEST RESULTS (all green):
pytest: 34 passed in 0.19s (28 existing + 6 new command tests)
ruff: All checks passed (0 errors)
vitest: 7 passed in 127ms (worker contract tests)
CLI e2e: vault --version / build / verify / stats / doctor / diff /
export-paper / ship --dry-run / publish + verify rc1 / api shim
via curl against 9199-question corpus — all green
Python-side fixes:
- interviews/vault-cli/pyproject.toml: ruff config now has principled
per-file-ignores for B008 (Typer pattern), N806 (DAG cycle colors),
E402 (scripts), SIM118 (sqlite3.Row iterator). Keeps signal tight.
- 13 real ruff violations fixed across authoring.py (contextlib.suppress),
diff_cmd.py + serve_api.py (dict(sqlite3.Row) instead of broken
.keys() iteration), policy.py (direct return), release.py (zip
strict=True, update_latest_symlink now validates target exists;
previous 'target' variable was unused), commands/release.py
(import order reshuffled, ambiguous 'l' renamed).
- commands/release.py ship_cmd leg-skip uses 'leg' not 'l'.
New pytest file: interviews/vault-cli/tests/test_commands.py (+6 tests)
- stats: JSON shape + Prometheus format.
- diff: add/remove/modify detection + classification.
- doctor: graceful skip on missing vault; unknown --check returns
USAGE_ERROR.
- codegen: --check passes against baseline.
Worker-side fixes:
- src/index.ts cachedOrCompute graceful-degrades when caches global
isn't available (Node test env, future-proofing against runtime
regressions).
- src/index.ts handleSearch: 'query: q' → 'query: qRaw' (q was
renamed earlier).
- src/rate_limit.ts: removed unused WINDOW_MS const.
- tests/worker.test.ts: vi.resetModules() between tests so
module-level schemaOk/lastSeenRelease state doesn't leak
across test cases (fingerprint memoization was sticky).
- package.json: added test:watch + lint aliases.
- .gitignore: node_modules, .wrangler, dist, .dev.vars.
- package-lock.json committed (npm — pnpm not on the machine; CI
updated to use npm ci).
CI (.github/workflows/vault-ci.yml):
- Split into python + worker jobs.
- Python job: ruff + mypy (non-blocking) + pytest + vault check
--strict + vault build release_hash regression + vault codegen
--check + registry append-only + exemplar audit staleness.
- Worker job: node 20 + npm ci + tsc typecheck + vitest run.
- Triggers now include staffml-vault-types path (keeps CI honest
when shared-types drift).
What runs vs what's gated on user:
RAN LOCALLY: pytest, ruff, vitest, tsc, CLI end-to-end smoke
(build→verify→export→stats→doctor→diff→publish
rc→api-shim→ship --dry-run), full corpus invariants.
GATED ON USER (requires Cloudflare credentials):
- wrangler login + wrangler d1 create
- wrangler d1 execute (schema + seed)
- pnpm/npm deploy:staging
- FTS5 production load-test
- vault ship --env production (live D1 + Next.js + tag push)
Everything that CAN be verified without credentials HAS been.
|
2026-04-16 14:30:20 -04:00 |
|
Vijay Janapa Reddi
|
5ee46fc2a5
|
feat(vault-cli): Phase 0 package scaffold
Pyproject.toml with Typer+Rich+Pydantic+PyYAML deps. Console entry
point 'vault' → vault_cli.main:app. Smoke tests cover --version,
--help, and the exit-code taxonomy regression guard.
Module layout:
src/vault_cli/__init__.py
src/vault_cli/_version.py — single source for __version__
src/vault_cli/exit_codes.py — stable IntEnum taxonomy (§4.6)
src/vault_cli/main.py — Typer app, --version flag
tests/test_smoke.py — 4 tests, all green in 0.04s
Subcommands land incrementally from Phase 1 per ARCHITECTURE.md §14.
Python ≥3.12 required; CI pins 3.12 for hash stability.
Milestone gate: pip install -e interviews/vault-cli/[dev] &&
vault --version passes. Tests green. Ready for Phase 1.
|
2026-04-15 21:25:52 -04:00 |
|