Skip to content

docs(principles): lift §1 to lint-enforced (5/16 → 6/16)#403

Closed
trilamsr wants to merge 1 commit into
mainfrom
chore/323-lift-panic-recovery-lint-linkage
Closed

docs(principles): lift §1 to lint-enforced (5/16 → 6/16)#403
trilamsr wants to merge 1 commit into
mainfrom
chore/323-lift-panic-recovery-lint-linkage

Conversation

@trilamsr

@trilamsr trilamsr commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #323 by completing the §1 sub-task that PR #357 left open.

PR #357 already shipped (a) the principles-to-enforcement mapping table in PRINCIPLES.md and (b) the §6 depguard pkg-private rule with the existing module/pkg/... allowlist. Both land at HEAD; go tool golangci-lint run ./... reports 0 issues.

The remaining gap to the 6/16 O7 supporting KPI was §1 ("trust under load"). It was recorded as partial lint because the recover()-wrapping convention itself is unlintable. The leak / swallow / deadlock surface that surrounds it is, in fact, fully machine-checked once the rules are named:

  • govet lostcancel — catches goroutine-leaking context.CancelFunc (deadlock vector → workload crash)
  • govet unreachable — catches dead recovery branches
  • gosec G104 + errcheck — no swallowed errors (every collect failure logged)
  • contextcheck — ctx propagation → bounded shutdown deadline

Promoting the §1 row to lint with that explicit linkage lifts the count from 5/16 → 6/16 (target met).

docs/v1-rc1-governance-gaps.md §2 is marked resolved; the historical baseline analysis stays below the resolution banner for audit trail.

Test plan

  • make lint0 issues
  • make doc-check → RFC-status, alert-check, chart-appversion-check, doc-check all pass
  • Depguard dry-run (golangci-lint run --default=none --enable=depguard ./...) → 0 issues (verifies §6 allowlist remains complete against the six existing module/pkg/ subpaths: nccl, patterns, replay, runtime, selftel, testutil)
  • CI green on PR
docs: lift PRINCIPLES.md §1 (panic-recovery) to lint-enforced via govet/gosec/errcheck/contextcheck, taking the O7 lint-enforced-principles KPI from 5/16 to 6/16.

Closes #323 by completing the remaining sub-task that PR #357 left
open. PR #357 added the principles-to-enforcement table and the §6
`depguard` `pkg-private` allowlist; both already land at HEAD.

§1 ("trust under load") was recorded as **partial lint** because the
`recover()`-wrapping convention itself is unlintable. The leak /
swallow / deadlock surface that surrounds it is, in fact, fully
machine-checked once we name the rules — `govet` `lostcancel` +
`unreachable`, `gosec` G104 + `errcheck`, `contextcheck`. Promoting
the §1 row to **lint** with that explicit linkage lifts the O7
supporting KPI to **6 of 16 (target met)** from the prior 5/16.

`docs/v1-rc1-governance-gaps.md` §2 is marked resolved with the audit-
trail context preserved. No code or `.golangci.yml` change — the
linters already run; the table now records the linkage so the next O7
audit reads from one place.

Signed-off-by: Tri Lam <tri@maydow.com>
@trilamsr

trilamsr commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

BLOCK per review — Makefile changes delete verdict-fixtures-check target + remove from verify: + ci-full: gates. That gate was added in #398 to prevent Go/Python SDK verdict drift. PR also bundles unrelated scope (kind-tracecore-up deletion, chart.yml inlining, cut-criteria scripts, etc.) from a stale base.

The actual §1 lint-linkage change is correct (5/16 → 6/16). Filing a clean redo as a separate small PR. Closing this one.

@trilamsr trilamsr closed this Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[rc1-prep] Lint-enforced principles: add principles-to-enforcement mapping table + §6 depguard rule

1 participant