Skip to content

provenance sweep sub-topic: repo-wide sweep, upstream-drift convention engagement, and the cleaned-state gate #3465

Description

@kyle-sexton

The provenance build plan's Phase 8 promotes the repo-wide sweep, the combined upstream-drift
convention engagement, and the narrow CI regression gate for the cleaned state into their own
sub-topic. This issue is that promotion artifact, and it is the Brief the sub-topic runs from.

Why this is an issue rather than docs/topics/provenance-sweep/PLAN.md

The plan named a contract slice as the promotion target. That target is not merge-able:
docs/topics/<slug>/ is Contract tier, branch-only, and scripts/check-contract-slice-prune.sh
hard-fails any new path there on the way to main — the parent topic's own slice was pruned for
exactly this reason (#3456). The work-item tracker is the graduation route the topic-docs
lifecycle names for actionable follow-ups, so the Brief lands here. Nothing about the plan's
content changes; only its vessel.

Precondition, and it is a hard one

The sweep cannot apply dispositions yet, and this is the gate's own arithmetic rather than a
blocker to route around.
The golden set ships at 10 cases across four groupings, so no class
reaches min_n_per_class 10 and every class is report-only at v1. fix and sweep apply
dispositions to fix-eligible findings only, and at v1 there are none.

So the sub-topic has two distinct stages, and the first does not wait on the second:

  1. A report-only sweep is runnable now and is worth running: it produces the corpus-scale
    telemetry (fetch counts, cache hits, carve-out declines, not-found rates) that the convention
    engagement needs as evidence, and it harvests adjudications into golden cases.
  2. A disposition-applying sweep unlocks only once the growth loop carries verbatim and
    near-verbatim past n=10 at or above the 0.95 precision bar. That is the named exit condition
    of the first growth round in provenance plugin: phases 6 to 8 (golden set and measurement, crosswalk registration, sweep) #3458.

Running stage 1 and feeding its adjudications back is what makes stage 2 reachable. Reversing
them is not an option.

Measured baseline entering the sweep

From the Phase 6 measurement (recorded in plugins/provenance/CHANGELOG.md): over 1,347 tracked
markdown files after carve-outs, 525 stamp candidates, 482 parsed, 43 declined, 0 expired at the
180-day default. Golden set: 10 cases, overall 8 tp / 0 fp / 0 fn / 2 tn, every class report-only.

The adversarial rotation probe (design thread T15) returned a real limit worth carrying into the
sweep: at roughly one substitution every four words, containment goes to 0.0 with no matched
spans against a source that was fetched and identity-checked. Word-shingling is evadable by an
author who intends to evade it, and no value of min_containment above zero recovers a passage
with zero matching shingles. The sweep should expect a floor on what the deterministic half can
confirm, and should not read a clean fingerprint as proof of originality.

Execution contract (inherited from the parent Brief)

  • One tracked file at a time. Apply the verdict, verify (semantic diff plus pointer liveness),
    close.
  • A file is closed when every finding in it carries a disposition or an explicit neutral
    outcome
    — never when the interesting ones are done.
  • Record each closure in the sweep ledger so an interrupted sweep resumes without re-deciding
    closed files, and so the closure count is a fact rather than a memory.
  • Carve-outs stay categorical. If the sweep starts accumulating per-instance suppressions, that is
    evidence a carve-out is drawn wrongly, and the fix is to redraw it in rubric.md — not to keep
    a suppression list. This matters beyond tidiness: see the convention engagement below.

The two additions the parent plan requires this Brief to carry

  1. The live no-breadcrumb (not-found) probe, as a first-run validation item. That disposition
    has never been exercised live — every spike source was supplied by hand. The sweep's first
    genuine no-breadcrumb candidate validates that the searched-surfaces listing names every
    surface actually checked, and that budget exhaustion reads as a first-class neutral outcome
    rather than as an acquittal.
  2. Sweep resume semantics. The fetch ceiling and the response cache are scoped per SWEEP, not
    per invocation, and both are recorded in the closure ledger. A resumed sweep therefore neither
    resets its spend nor silently reuses a stale cache. The ledger is checkout-local; state that
    explicitly, because a sweep resumed in a different checkout is a new sweep.

The convention engagement (fires at sweep completion only)

Drafted in full at docs/specs/provenance-convention-engagement.md. It executes as one entry
in docs/conventions/upstream-drift/CHANGELOG.md, carrying three parts:

  1. Recorded-decision re-derivation. chore(conventions): plugins restating upstream harness facts are not adopters of upstream-drift, so stale claims never surface #2273 deferred an adoption gate with its own stated
    trigger: "a detector is demonstrated that separates an upstream restatement from an in-repo one
    without a suppression list." Sweep completion either is that demonstration or it is not, and
    the engagement says which from evidence — the closure ledger, the measured precision/recall at
    the stated minimum n, and the carve-out record showing categorical exclusions only. If the
    sweep accumulated per-instance suppressions, the bar is not cleared, the trigger has not fired,
    and the engagement records exactly that with the count.

    The honest expected outcome, stated now so the engagement cannot overclaim later: the detector
    is LLM-led with deterministic verification, so the enforceability row moves at most from
    reasoning-only to detect-then-judge, and a deterministic suppression-free CI gate in the
    *-gate pattern remains unavailable.
  2. Enforceability table update, version bump conditional. Major bump ONLY if an enforceability
    verdict changes; otherwise a minor entry with the as-of date refreshed and the outcome stated,
    drift or no drift.
  3. The trigger-less-stamp table-row flip. Partially pre-consumed: the check's code shipped in
    Phase 3 and its crosswalk row in Phase 7 (feat(provenance): documentation-provenance audit plugin (phases 1 to 5) #3456 and the Phase 7 work). What remains here is
    exactly the convention's own row moving from "named but not built" to "built, off-by-default,
    repo-override enabled", plus the build-trigger bookkeeping. The registry row's early presence
    is scheduled, not drifted.

Also recorded at the same firing: the hash-store designed-issue trigger evaluated against the
sweep's fetch telemetry; the dead-pointer round-trip wiring (the weekly link-check lane routing
to the demotion path in reference/dispositions.md); and the adopters table, where rows are
added only for surfaces that actually conform, with #2297 getting its closure evidence if the
repository ends the sweep conforming.

What the engagement never does: declare the migration playbook's plugin-eval deferral trigger
fired; rewrite prior changelog entries or dated records; or convert a judgment verdict into a
deterministic claim — report-only tiers stay report-only whatever the sweep measured.

Checklist

  • Grow the golden set past min_n_per_class for verbatim and near-verbatim (provenance plugin: phases 6 to 8 (golden set and measurement, crosswalk registration, sweep) #3458)
  • Run the report-only sweep; record closure ledger, telemetry, and adjudications
  • Validate the live no-breadcrumb not-found probe on its first genuine case
  • Confirm sweep resume semantics (per-sweep ceiling and cache, checkout-local ledger)
  • Disposition-applying sweep, once a class is fix-eligible
  • Execute the convention engagement as one upstream-drift/CHANGELOG.md entry
  • Evaluate the hash-store designed-issue trigger against the sweep's fetch telemetry
  • Wire the dead-pointer round-trip to the weekly link-check lane
  • Narrow CI regression gate for the cleaned state

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions