← Back to Pull requests

Contract: state three review page and hosted site states, and close the gap that missed them #100

Open
unknown opened this pull request with 440 lines diff across 5 files
View on GitHub
unknown unknown commented on Oct 04, 2026 01:26 UTC
Author

Summary

Three states that tests prove but no criterion stated, how each was missed, and the skill changes that stop it recurring. Backfilling Tieline's own screens left 8 of its 11 screens unlinked. Tracing each one:

| Screen | How it was missed | Fix |
|---|---|---|
| Onboarding empty page ("No capabilities yet") | Added in #30, which changed src/contract/review-page.ts, a file CONTRACT-001-AC4 implements. AC4 says only "render … a self-contained human-readable review page", which the change leaves true, so the new state counted as covered. #30 didn't touch the contract. | A scenario on CONTRACT-001-AC4, with test-tieline.ts linked |
| "The contract does not validate" | Added in #96 (mine), the same file and the same broad criterion. I added scenarios for the change markers, not for this state. | A scenario on CONTRACT-001-AC4, with test-review-changes.ts linked |
| Hosted site "not configured" | Written in the same commit as CONTRACT-005-AC14 (#90). Its test is linked under AC14, but AC14's text describes only the main path. | A scenario on CONTRACT-005-AC14 |
| Canvas, detail panel, filtered view | My backfill linked one screen per criterion and filed these as states "no criterion covers". CONTRACT-005-AC5 already promises them. The skill said "catalog the screen", singular, and the sweep step never asked whether an existing criterion already states a found state. | Skill wording below; linked in the scratch backfill |
| Search with no matches, everything expanded | Incidental UI states. | None: unlinked is right |

The common pattern: a broad criterion that a change leaves true counts as coverage, so new states, whether empty, error or configuration, slip through. The data to catch them was always there. Matching each unlinked screen's paths against the criteria that implements those files suggests the right criterion for all six.

Changes

  • Contract: CONTRACT-001-AC4 gains the empty and invalid-contract scenarios plus links to the tests that prove them. CONTRACT-005-AC14 gains the missing-settings scenario.

  • Skill, semantic closeout (skills/tieline/SKILL.md):

  • - covered now requires a criterion that states the behavior's observable outcome;
    - a new empty, error, permission or configuration state, or an outcome a linked test proves but the criterion doesn't state, is an update or an add.
  • Skill, screens backfill (references/screens-capture.md):

  • - one criterion can show several screens;
    - before treating a swept state as uncovered, look for the criterion that states it, starting with those whose implements links name the screen's files;
    - on a branch, link each new state to its criterion.

    Protected surfaces

  • Agent instructions (both skill files): reviewed by npm run test:guardrails (48, 12 and 18 passing), with new assertions in test-tieline.ts that pin the guidance.

  • Repository contract: scenarios and test links only; no criterion text changed.
  • Test plan

  • npm run check: exit 0

  • Guardrail grading against conductor/screens-backfill-fixes: pass
  • Follow-ups (not in this PR)

  • Candidate criteria in the audit: tieline screens audit could list unlinked screens with the criteria that implement their files, mechanically, as above. A suggestion only, never a failure.

  • An "intentionally unlinked" marker, so incidental screens leave the "with no links" count once reviewed.
  • Stacked on #99.

    🤖 Generated with Claude Code

    Diff: 440 lines (+330 / -110) across 5 files Reviewer: chatgpt-codex-connector[bot] Review duration: 5m
    All Vouch review confidence checks passed
    Residual risk 0.34 = Change Risk (0.45) × (1 − Review Confidence (0.25)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 440 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 45% · Reviewer familiarity: 35%
    24%
    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.364
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #100"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 24.9% 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: 45.3% (MEDIUM) · Higher = larger blast radius
    45.3%
    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: 24.9% · Lower = rushed or shallow review
    24.9%
    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: 34.0% · Safe to merge
    34.0%