Files
OwnCord/docs/plans
J3vbandClaude Fable 5 63c87df487 refactor(b3-8): settings/audit family behind SettingsService (S-09, family 1) (#1477)
* feat(service): settings family — SettingsService over the Store seam

The B3-8 settings/audit family's service: List, Patch (whitelist,
boolean normalization, the require_2fa preconditions incl. the TOTP
census and the unrelated-key guard, atomic apply, one audit row per
changed key) and Setting (the read the hub and the backup scheduler
consume; wraps db.ErrNotFound as the store reports it). db gains
ApplySettings — the handler's raw upsert loop as one hand-written
transactional wrapper where raw SQL belongs — and Store carries it.

parseSettingsPatchBool duplicates auth.go's parseBooleanSettingValue
with the admin surface's own pinned error wording; both messages are
test-pinned, so the twins stay separate.

Service-level characterization in settings_test.go mirrors the
admin/api_test.go PATCH rows and adds the service-only contracts
(ErrNotFound wrap, audit rows, multi-key apply).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8dwVLEihnGZYtH9X631F4

* refactor(admin): settings handlers thin over SettingsService; scheduler reads via it

handleGetSettings/handlePatchSettings become adapters (decode, delegate,
map ErrBadRequest to 400 with the service's prefix-free message); the
whitelist and every precondition now live only in the service, so
admin/types.go's copy is gone. MaintainBackups reads backup_schedule and
backup_retention through the service — its backup mechanics keep the
handle — and the maintenance chain threads Settings from the runtime the
hub stage built. NewHandler/NewAdminAPI gain the settings parameter;
all 207 construction sites wired via the newTestSettingsService helper.

Behavior parity pinned by the existing TestAdminAPI_*Settings* rows
(all green); the only unpinned change is the PATCH 500 path collapsing
its four stage-specific internal messages into one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8dwVLEihnGZYtH9X631F4

* refactor(ws): hub settings cache reads through a SettingsReader

The hub's server_name/motd cache consumes a consumer-side SettingsReader
interface (service.SettingsService satisfies it; HubOptions.Settings is
required and validated like DB and Limiter — the RequiredCollaborators
pin gains the refusal case). hub_settings.go no longer touches db at
all, so the import pin from the B3-5 finisher goes, and its allowlist
row goes with it; the thinned admin settings handler's row is deleted
too — two allowlist rows down, the settings family's persistence now
lives only in db/ and service/.

Test helpers (both ws package namespaces) default the reader over the
test database; newBareHub wires it explicitly; production passes
Services.Settings from StartRuntime.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8dwVLEihnGZYtH9X631F4

* docs(boundaries,b3): settings/audit family re-measure and evidence

The backup pair takes its forecast boundary disposition; the family's
two deleted rows and the disposition counts (28/18/15 -> 24/18/17)
re-derived from the tool. Family evidence block appended to the B3-8
section; README B3 row records B3-5 complete and the family opened.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8dwVLEihnGZYtH9X631F4

* fix(service): prefix-free ErrBadRequest wraps for the pinned admin bodies

The %.0w rework was meant to ride the service commit but was left
unstaged: with the plain %w wrap the PATCH error bodies carry a
'bad request: ' prefix the admin pins reject. Zero-width wrapping keeps
errors.Is(ErrBadRequest) while err.Error() stays exactly the pinned
message.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8dwVLEihnGZYtH9X631F4

* test(app): lifecycle hub fixtures wire the required Settings reader

The two direct ws.NewHub sites in lifecycle_test predate Settings
becoming required; race across internal/app is green again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8dwVLEihnGZYtH9X631F4

* test(db): cover ApplySettings — the db coverage floor caught the gap

CI's coverage floor failed db at 78.9% against 79.3%: ApplySettings was
exercised only from service tests, which do not count toward db's own
figure. Four db-side rows cover the apply, the empty no-op, the
in-transaction failure rollback and the begin failure, using the
package's full-migration opener.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8dwVLEihnGZYtH9X631F4

* chore(coverage): raise the service floor to the branch's measured 69.2

The settings family's tested service code raised the Linux figure from
the 67.8 floor to 69.2; the ratchet raises the floor in the same PR
(service is not in the run-varying set). db stays at 79.3 — this PR
restores its figure (79.5 with the ApplySettings tests), it did not set
out to raise it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8dwVLEihnGZYtH9X631F4

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-31 15:13:38 +00:00
..

Plan index

Closes G-04. Historical plans are kept at their existing paths — links from audits and commit messages must keep resolving — so status is recorded here rather than by moving or rewriting them.

A plan's own header can drift out of date after its table is updated in place. Where that has happened it is called out below, and this index is the authority.

Active — these drive current work

Plan State
beta-product-requirements-2026-08-23 Approved beta scope, frozen. 57 BPR-* requirements. Amended 2026-08-31: BPR-032 reworded to the slim single-current-epoch policy (owner decision; the scope HP-2 accepted).
repo-health-roadmap-2026-08-23 Phase order and gates, B0B10. B0, B1 and B2 complete (HP-0, HP-1 and HP-2 all accepted); B3 in progress — the B3 plan row below tracks it. B4B10 not started. Amended 2026-08-28: dated lines in B3B10, a "Phase execution pattern" section, and a truthful status header. Amended 2026-08-29: B3/B7/B9 lines binding the layout-refactor supplement below; current slice updated for B2-2. Amended 2026-08-31: B1 exit reworded to identical-tree integration evidence; B6/B8/B10 server-info and epoch-window lines aligned with the B2-2 slim decision; B10 gains the BPR-051 comprehension-read row (owner decisions 2026-08-31).
repo-health-issue-register-2026-08-23 116 planning rows. Public-safe; not a replacement for the ledger. Amended 2026-08-31: OC-03490375 and OC-0379 enumerated with owner-approved phases; G-03 closure evidence reworded to identical-tree integration evidence; BG-07 re-scoped to BPR-032 as amended.
beta-requirements-traceability-2026-08-23 Requirement → phase → evidence map. No row is release-qualified.
b0-baseline-2026-08-25 Supersedes the roadmap's "current evidence snapshot." B0 measurements and dispositions.
b1-repository-foundation-2026-08-25 B1-0 through B1-8 all done. B1 execution plan. Re-verifies every RL-* claim against HEAD; several are refuted.
hp-0-scorecard-2026-08-25 HP-0 accepted 2026-08-25. The single baseline-acceptance artifact. Part-closes R-08.
hp-1-scorecard-2026-08-27 HP-1 accepted 2026-08-27. Structural-diff proofs for the flatten and module rename, plus the B1 exit gate.
b2-protocol-trust-compat-2026-08-28 B2 complete — HP-2 accepted 2026-08-29. B2-0, B2-1, B2-8 done 2026-08-28; B2-2 (B2-3/B2-4 folded in), B2-5, B2-6, B2-7, B2-9 done 2026-08-29. Scorecard below.
hp-2-scorecard-2026-08-29 HP-2 accepted 2026-08-29. Seven questions answered with commands; B2 exit gate, nine conditions met (1 at the slim epoch scope, 4 with one E2EE gap disclaimed). Owner follow-ups that do not gate B3: BPR-051 reader line, SEC-01/SEC-04 advisory IDs.
b3-server-architecture-guardrails-2026-08-29 B3 in progress from 2026-08-29. Execution plan: B3-0 inventory → B3-1/B3-2 auth slice → HP-3 → lifecycle, hub options, ws split, families; guardrails and the alpha dataset beside the slice. B3-0 (inventory + db-import-boundary rule) and B3-1 (auth characterization) merged 2026-08-29; B3-2 (auth vertical slice) merged 2026-08-30; B3-9 (five of the six B3-tagged findings; OC-0323 rides B3-8) merged 2026-08-30; HP-3 accepted 2026-08-30; B3-3 (lifecycle extraction into Server/internal/app/) merged 2026-08-30 (#1464); B3-4 (hub constructor options) merged 2026-08-31 (#1470); B3-7 (deterministic alpha dataset) merged 2026-08-31 (#1469); B3-5 (ws split) in progress — split PR 1 (handshake auth + fresh-connect) merged 2026-08-31 (#1472); split PR 2 (replay family + connection registry) merged 2026-08-31 (#1473); split PR 3 (visibility gather) merged 2026-08-31 (#1474); split PR 4 (voice leftovers + presence coalescer) merged 2026-08-31 (#1475); finisher merged 2026-08-31 (#1476) — B3-5 complete, all seven responsibilities and all three size targets; B3-8 in progress — settings/audit family (first of seven) opened 2026-08-31.
hp-3-scorecard-2026-08-29 HP-3 accepted 2026-08-30 by the owner. Five questions on the auth vertical slice answered with commands: frozen set green at every pre-squash SHA, api db importers 12 → 10, B2 contracts unchanged, the pattern written as D4 in server.md, guardrails as they exist.
b3-bench-baseline-2026-08-30 Recorded 2026-08-30, not gated. The six B3-6 Benchmark* through benchstat at ec8ef24a, produced by make bench-baseline. Nothing in CI reads these numbers; the performance gate is B6's. Regenerating writes a new dated file — replace this row and delete the superseded document, so only the newest baseline is kept.
audit-2026-08-19-remediation Phases 16 done 2026-08-20; phase 7 pending. Its header still reads "in progress 2026-08-19" — stale; the phase table is correct.

Partially implemented

Plan State
bug-detection-improvements Tier 1a (make fuzz) and Tier 2 (five ESLint rules) shipped 2026-08-08. Remaining tiers open.

Design only — not implemented

Plan State
developer-experience-layout-refactor-2026-08-29 Draft, not started. Implementation supplement bound into the roadmap 2026-08-29: B3 workstream 17 (Phases 13, auth slice → HP-3), B7 workstream 16 (Phases 46), B9 workstream 11 (CSS split). Nothing starts before HP-2.
slash-commands Design only. No implementation; not in beta scope.

Shipped — kept for history, do not use as current status

Plan Shipped
audit-2026-07-19-decisions Decisions recorded; greenlit items implemented through 2026-07-23.
channel-visibility-unification 2026-07-20 (D9), re-verified 2026-08-04.
v2-dispatch-migration 2026-07-20 (D10), re-verified 2026-08-04.
tauri-capability-narrowing 2026-07-20, re-verified 2026-08-04.
http-tofu-proxy 2026-07-19, re-verified 2026-08-04.
permission-middleware-consolidation 2026-07-23 (D13), re-verified 2026-08-04.
security-hardening-remediation 2026-07-23, re-confirmed 2026-08-04.
security-scan-2026-07-22-remediation All 8 findings F1F8 closed, verified 2026-08-04.
sqlc-adoption Shipped, verified 2026-08-04.
discord-parity Phases 16 complete, verified 2026-08-04. Phase 1's table reads as a gap list but every row shipped.
infrastructure-roadmap 2026-08-15, with two recorded leftovers (TOTP persister seam; published capacity numbers).

Where status actually lives

Planning documents are not trackers. Do not read a defect count out of one.

Concern Source of truth
Defect status .superpowers/findings-ledger.json (FINDINGS.md is rendered from it)
Security-sensitive defects Private GitHub Security Advisories
Product scope beta-product-requirements-2026-08-23
Phase order and gates repo-health-roadmap-2026-08-23
Current measured baseline b0-baseline-2026-08-25

Ledger at 2026-08-31: 321 fixed / 54 open / 3 declined / 1 duplicate = 379 (B3-9, PR #1454, closed the five B3-tagged records; OC-0379 records and fixes OC-0345's leftover role re-read). The 2026-08-25 sweep resolved every record then open to a live file:line at 5cc0888964e26276d1aca145e83270a2c1b9febd — a manual pass, not something a command reproduces, and not repeated for records opened since. What the tooling does check:

node .superpowers/render-ledger.mjs --check   # the ledger's schema is valid
node scripts/check-doc-counts.mjs             # documents agree with it, and
                                              # FINDINGS.md is not stale

Adding a plan

  1. Give it a **Status:** line with a date, and update that line — not only the phase table — when it changes.
  2. Add a row here. A plan absent from this index has no recorded status.
  3. Mark a superseded plan here; leave it at its path so existing links resolve.