← Back to Pull requests

Protect published schema-65 systemd activation #938

Closed
unknown closed this pull request without merging on Oct 17, 2026 17:42 UTC
View on GitHub
unknown unknown commented on Oct 17, 2026 15:57 UTC
Author

Summary


Adds one protected systemd route for the rehearsed schema-65 database to the fixed published RC4 registry at 128, without permitting ordinary runtime rollback after database writes.

This PR is stacked on #934 only to preserve ADR numbering and shared controller-option integration; its deployment transaction is Linux/systemd-specific and independent of the launchd route.

Changed


  • Pins the candidate tag, commit, version, x86_64-musl asset digest, and complete migration-registry digest while sourcing the retained root helper from a separate explicit controller commit.

  • Stops and persistently inhibits both service and socket, snapshots the exclusive source database, then proves the exact candidate can migrate an isolated snapshot copy before touching the live database.

  • Writes a durable transaction-bound marker before the first live --migrate-only invocation; every later failure retains the claim, backup, candidate, registry, and reboot fence and forbids predecessor startup or snapshot replay.

  • Adds candidate-only recovery: exact same-registry prefixes may rerun only the retained candidate, while an exact target may start only that candidate after stop-first evidence validation.

  • Preserves the protocol-v1 wire shape for ordinary/older release helpers while repaired controllers reject observed pending migrations before handoff by deriving the target with the exact candidate binary.

  • Makes staging crash-recoverable with status-before-claim ordering and lock-owned retirement of only unambiguous partial staging; malformed, prepared, or post-marker evidence remains fenced.

  • Records the exact compatibility boundary in ADR-116, requirements, the production deployment model, and operator guidance. No other Linux baseline, candidate, architecture, bare mode, downgrade, or rollback guarantee is added.
  • Why


    The existing systemd helper restores and restarts the predecessor after candidate health failure even when startup may have migrated SQLite. Schema 65→128 therefore needs an explicit offline write boundary and candidate-only recovery, not the ordinary artifact rollback path.

    Verification


    Hosted CI is the qualification authority for this branch. Local development used static compilation/diff checks plus focused mocked Python suites before the local no-test boundary; no production host or application build was used for acceptance.

    Diff: 298 lines (+223 / -75) across 3 files Reviewer: scottopell Review duration: 104m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 298 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.341
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #938"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40% (MEDIUM) · Higher = larger blast radius
    40%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.8% · Safe to merge
    15.8%