Skip to content

Lineage stage 2: trusted delivery persistence and semantic publication #991

Description

@jeffhuber

Part of #963, stabilization epic #979, and roadmap #900. Depends on accepted #990 (pure lineage contract). Replaces the delivery/publication portion of unaccepted draft PR #989.

Problem and outcome

Verified contribution history must survive takeover and subsequent fix rounds, be published through a trusted path, and be semantically read back before the active builder label moves. Missing or unreadable evidence must stop before side effects.

Scope

  • Private metadata-only handoff/delivery persistence and current-head continuation recording, consuming Local builder handoff: make takeover quiescent, Git-write capable, and runner-consistent #962 quiescence/capability and Participants: enforce role-specific qualification for hosted builders #975 role qualification.
  • Trusted publisher and builder auto-record attribution; selected explicit history remains distinct from REST numeric comment count and is validated before normalization.
  • Semantic authenticated publication readback: parse the complete bounded trusted history, bind exact target/head and compare resolved episodes; substring presence or successful POST is insufficient.
  • Publication-before-label reconciliation, fresh exact label/head reads, one active builder label, and no mutation on uncertain evidence.
  • Delivery/publication functions and test harnesses required by maintained runners; actual rendered-runner tests must execute the failure paths without skip. Defer automatic runner label reconciliation activation and its maintained/template/package wiring to the consumer stage: accepted pre-lineage consumers must never observe moved labels under the old policy.
  • Base-controlled provenance workflow, reviewed authority source/repository setting override, read-only permissions, no PR checkout/code/config execution, finite explicit comment-page requests and cap probe.

Keep provider reviewer admission, gate/status/labeler projections, the three automatic runner hooks, and CLI label-reconciliation activation for the consumer stage. New delivery/publication behavior may be exercised explicitly by tests but must not silently activate a label transition before all consumers are accepted. No new cloud schema or hosted implementation.

Typed-core dependency update

Consume the eventually accepted #990 contract from replacement PR #994. Superseded #989/#993 are regression references only. Keep canonical and standalone builder_lineage.py pure; storage, compatibility translation, authenticated publication and label application belong in narrowly owned producer adapters.

Construct explicit Target, Identity, History and Authorities values; feed public marker arrivals and private arrivals directly into one target-bound Chain factory before resolution. No optional-history fallback, pre-deduplication or intermediate budget reset. Missing transport refuses; genuine empty fetched history remains valid. Catch contract errors before any comment, label or artifact effect.

Translate supported legacy schema/writer-state records explicitly with full trust and immutable-target checks, or report unsupported history; do not silently discard them or weaken the pure parser. Writer-state strings are validated shapes, not proof of exit. Handoff requires separately verified #962 writer quiescence; logical completion/cancellation alone is insufficient. Suspended is not terminated, and continuation requires the actual same writer and chained exact heads.

Semantic publication readback uses authenticated public-only history and compares the complete canonical expected episodes. Adding private episodes to readback must not mask a missing publication. Keep automatic consumer/runner activation deferred to #992.

Acceptance and Code Mower delivery

One isolated Code Mower Codex writer, one draft child PR using Refs #963, accepted contract dependency on main, and qualified independent exact-head Claude review. Use the verified Codex runtime containment/Git/guard probe; the previously planned Claude source request was cancelled before launch, rather than adding a new runtime project to this unit. Codex execution has finite duration/output limits and no native USD cap. Reconstruct the owning preserved #989 diff, preserving relevant fixes and real CLI/generated-workflow/runner regressions. Cover takeover followed by ordinary fix, malformed transport/field/page shapes, empty/ambiguous/conflicting public markers, wrong target/head, readback trust, and refusal before comment/label/artifact side effects. Exact unittest discovery, focused checks, Ruff/privacy/package guards, full CI and authoritative gate must pass. Record writer exit/quiescence and lease closeout separately. No new hosted Devin create allowance.

Staged artifact tests must prove the new source behavior independently of the existing code-mower==1.4.0 template pin. #915 owns the eventual published-package pin and candidate/published installation qualification.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions