Skip to content

Hardening Sprint: replay/export, modularization, trust hardening #30

@USTungsten

Description

@USTungsten

Hardening Sprint Complete

API Modularization (Part 2)

  • Split cases_api.py (1036 lines) into 7 focused route modules under src/goose/web/routes/:
    • cases.py — case CRUD (create, list, get, status update)
    • evidence.py — evidence ingest and retrieval
    • analysis.py — analyze, findings, hypotheses, plugins, diagnostics, audit
    • timeline.py — timeline construction
    • charts.py — chart data retrieval
    • exports.py — exports, bundles, replay verification, reports
    • runs.py — analysis run tracking
  • All existing routes preserved with identical URLs and response shapes
  • cases_api.py now serves as thin router aggregator + CaseService provider

Replay/Export Subsystem (Part 3)

  • Enhanced bundle format with bundle_id, case_metadata, replay_metadata, parse_diagnostics
  • Export history recorded in case.json via CaseExport model
  • ReplayVerificationReport model compares bundle versions against current engine
  • POST /exports/verify-replay — detects EXACT, VERSION_DRIFT, PARTIAL, INCOMPATIBLE states
  • MissionSummaryReport, AnomalyReport, CrashMishapReport models in src/goose/forensics/reports.py
  • Report generation routes: GET /exports/reports/mission-summary, /anomaly, /crash

Run-Centered Investigation (Part 4)

  • GET /runs — list analysis runs for a case
  • GET /runs/{run_id} — run detail with plugin statuses and hypotheses count
  • GUI run selector in workspace header (dropdown with run metadata)
  • workspaceState.runId tracked and selectable

Plugin Trust Hardening (Part 5)

  • fingerprint_plugin() — SHA-256 of plugin source code
  • TrustPolicy — PERMISSIVE, WARNED, ALLOWLIST_ONLY modes
  • Fingerprints computed and trust evaluated at analysis time
  • Plugin diagnostics record trust verification state
  • GET /plugins now includes computed_fingerprint, trust_verified, policy_mode

GUI Improvements (Part 6)

  • Exports tab: Mission Summary, Anomaly Report, Crash/Mishap Report buttons with formatted results
  • Replay verification UI with bundle selector and match state badges (color-coded)
  • Run selector dropdown in workspace header
  • Plugin trust visibility: Verified/Unverified badge, fingerprint prefix, policy mode

Tests

  • 512 tests passing (464 original + 48 new)
  • test_replay_export.py — bundle creation, export history, replay verification
  • test_report_objects.py — all 4 report model round-trips
  • test_trust_policy.py — PERMISSIVE, ALLOWLIST_ONLY, BLOCKED, fingerprinting
  • test_api_modularization.py — full regression suite for all routes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions