NS7 slice: Add performance and failure diagnostics gates #40

Closed
opened 2026-06-20 23:28:21 +00:00 by tmk241 · 1 comment
Owner

OBJECTIVE: Set practical bounds and visible diagnostics for rendering, search, jobs, LSP startup, save failures, and large/unsupported files.

AUTHORITY: Parent #7 NS7: V1 release hardening and rollout; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: governance/001-005; all v1 requirement rows as release gates).

AGENT AUTHORITY:

  • Delivery authority: local-commit
  • Tracker authority: this issue may be commented and closed when acceptance passes.
  • Handoff state: committed clean, tracker commented/closed.

PARENT: #7 via explicit issue link and parent checklist.

SCOPE: The smallest source/docs/tests needed to make this behavior real and verified.

BOUNDARIES: No telemetry or hosted crash reporting.

ACCEPTANCE: Representative fixtures stay within documented bounds or emit actionable diagnostics; no silent stalls/corruption.

VERIFICATION: Run the cheapest command that proves acceptance. Include regular tests for the intended payoff and adversarial tests for realistic failure, boundary, or regression cases. If no implementation test command exists yet, create/record the canonical command in AGENTS.md as part of the slice.

BLOCKERS: none

GOAL: Implement this vertical slice to the ACCEPTANCE above, keep the repo clean, cite relevant req: anchors in code/tests where applicable, and close only after verification passes.

OBJECTIVE: Set practical bounds and visible diagnostics for rendering, search, jobs, LSP startup, save failures, and large/unsupported files. AUTHORITY: Parent #7 `NS7: V1 release hardening and rollout`; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: governance/001-005; all v1 requirement rows as release gates). AGENT AUTHORITY: - Delivery authority: local-commit - Tracker authority: this issue may be commented and closed when acceptance passes. - Handoff state: committed clean, tracker commented/closed. PARENT: #7 via explicit issue link and parent checklist. SCOPE: The smallest source/docs/tests needed to make this behavior real and verified. BOUNDARIES: No telemetry or hosted crash reporting. ACCEPTANCE: Representative fixtures stay within documented bounds or emit actionable diagnostics; no silent stalls/corruption. VERIFICATION: Run the cheapest command that proves acceptance. Include regular tests for the intended payoff and adversarial tests for realistic failure, boundary, or regression cases. If no implementation test command exists yet, create/record the canonical command in AGENTS.md as part of the slice. BLOCKERS: none GOAL: Implement this vertical slice to the ACCEPTANCE above, keep the repo clean, cite relevant `req:` anchors in code/tests where applicable, and close only after verification passes.
tmk241 added this to the v1 milestone 2026-06-20 23:28:21 +00:00
tmk241 added the sliceready-for-agentgoal labels 2026-06-20 23:28:21 +00:00
Author
Owner

Implemented in commit 8658f7cc95 (Add visible v1 diagnostics guardrails).

Verification:

  • zig fmt src/diagnostics.zig src/repo.zig src/job.zig src/lsp.zig src/tui.zig src/main.zig src/v1_smoke.zig: pass
  • zig build test: pass
  • zig build v1-smoke: pass
  • zig build: pass
  • zig build run -- --help: pass
  • zig build --prefix /tmp/mim-install-diag-final verify-install-code: pass
  • redgate lint / health: pass

Regular tests: added local diagnostics constants/rows for file-size guardrails, search truncation, process output limits, and save failures. Repo search now caps rows and emits diagnostic:search_truncated; TUI surfaces that on the status line for small viewports. Job and LSP process rows now include explicit stdout/stderr limit diagnostics while preserving existing row ordering. TUI rejects over-large repo fixtures and saves with visible diagnostic messages.
Adversarial tests: v1-smoke covers truncated searches, missing job/LSP commands with diagnostics, invalid repo_file paths, large repo files, and large save attempts.

Boundary: visible local diagnostics only. No telemetry, crash reporter, daemon watchdog, retry policy, benchmark harness, or external monitoring service added.

Implemented in commit 8658f7cc957c (Add visible v1 diagnostics guardrails). Verification: - zig fmt src/diagnostics.zig src/repo.zig src/job.zig src/lsp.zig src/tui.zig src/main.zig src/v1_smoke.zig: pass - zig build test: pass - zig build v1-smoke: pass - zig build: pass - zig build run -- --help: pass - zig build --prefix /tmp/mim-install-diag-final verify-install-code: pass - redgate lint / health: pass Regular tests: added local diagnostics constants/rows for file-size guardrails, search truncation, process output limits, and save failures. Repo search now caps rows and emits `diagnostic:search_truncated`; TUI surfaces that on the status line for small viewports. Job and LSP process rows now include explicit stdout/stderr limit diagnostics while preserving existing row ordering. TUI rejects over-large repo fixtures and saves with visible diagnostic messages. Adversarial tests: v1-smoke covers truncated searches, missing job/LSP commands with diagnostics, invalid repo_file paths, large repo files, and large save attempts. Boundary: visible local diagnostics only. No telemetry, crash reporter, daemon watchdog, retry policy, benchmark harness, or external monitoring service added.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tmk241/mim#40