chore: backlog triage delivery — admiralty-decision docs, sidecar cleanup, incremental mypy sensor#124
Merged
Merged
Conversation
Wire mypy as a check-only pre-commit sensor, rolled out per-module via an allow-list rather than repo-wide: a full lenient run currently surfaces ~99 errors across 6 modules (root cause: _read_json returns dict | list and callers treat it as dict), so a repo-wide hook would block every commit and derail agents. Base [tool.mypy] config is lenient; strict is enabled per-module through the overrides block + the pre-commit files: allow-list. First migrated module is nelson_circuit_breakers (strict-clean). Remaining modules and end-state (strict = true repo-wide) tracked in nelson-8q8. Refs nelson-8q8.
The admiralty-decision subcommand was undocumented, and the admiralty_action_completed event-table row listed 'task_id, resolution', which never matched the real fields. Document the subcommand (incl. the required --recorded-by provenance arg) and correct the event row to the actual emitted data: task_id, decision_type, recorded_by, session_marker_present (+ optional task_type, ship_class, notes). Closes nelson-bws.
cmd_stand_down wrote stand-down.json but never unlinked the .nelson/.active-<session_id> recovery sidecar created by _do_init, so stale markers accumulated in .nelson/ across missions. Add a best-effort, idempotent unlink mirroring the adjacent admiral-session-marker cleanup. Covered by two regression tests (removal + missing-sidecar tolerance). The _find_active_mission docstring's stale 'symlink files' wording was already corrected in an earlier change. Closes nelson-a06.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Delivers three triaged-and-approved backlog beads. Each was verified against the current code, implemented minimally (anti-bloat), adversarially reviewed (0 critical/high/medium findings), and run through the repo sensors.
8386c19admiralty-decisionsubcommand instructured-data.md(incl. the required--recorded-byprovenance arg) and fix the staleadmiralty_action_completedevent-table row (task_id, resolution→ the real emitted fields). Docs-only.eb35030cmd_stand_downnow unlinks the.nelson/.active-<session_id>recovery sidecar (idempotent, mirrors the adjacent admiral-marker cleanup), so stale markers no longer accumulate. +2 regression tests. The_find_active_mission"symlink files" docstring was already fixed in an earlier change.c60053anelson_circuit_breakers.Why mypy is scoped, not repo-wide
A full lenient mypy run currently surfaces ~99 errors across 6 modules (root cause:
_read_jsonreturnsdict | listand callers treat it asdict). A repo-wide hook — even lenient — would block every commit and derail agents, the exact failure the bead warns about. So the base[tool.mypy]config is lenient, strict is enabled per-module via overrides + the pre-commitfiles:allow-list, and the rollout (next:nelson_data_utils, 18 errors; end statestrict = truerepo-wide) is tracked in nelson-8q8 (kept open).Triage context
This branch is the delivery half of a backlog grooming pass over 9 open beads. Also closed (no code, decision-only):
nelson-6bw(already done),nelson-7rm+nelson-q96(Tier 2/3 sensors — over-engineering for a skill repo),nelson-h4g(Pi harness — not pursued). Kept as backlog:nelson-e6j,nelson-y2l, andnelson-8q8(rollout tracker).Test plan
pytest skills/nelson/scripts/— 384 passed (incl. 2 new sidecar tests; confirmed RED before fix)pytest hooks/— 64 passedpytest scripts/— 21 passedruff check+ruff format --check— cleanmarkdownlint-cli2on the changed doc — 0 errorspre-commit run --files <changed>— all hooks passnelson_circuit_breakersand skips all other files