Skip to content

Repair source publication observation and same-carrier recapture - #3873

Merged
trissim merged 5 commits into
mainfrom
work/pi-typed-dispatch--P1092-publication-recovery--agent-comms
Nov 2, 2026
Merged

trissim merged 5 commits into
mainfrom
work/pi-typed-dispatch--P1092-publication-recovery--agent-comms

Conversation

@trissim

@trissim trissim commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Five commits across ten files,+437/-84, refreshed on current main and published asf6f2a196de3f287c9f9c21f1a06bb107020c9008. Range-diff proves all five patches unchanged from889a217591. Toad#1421's namespace-root repair is now merged, so the old baseline duplicate-module failure can be retested on a fresh captured cut. Runs17–19 and15 affected run20 controls passed on their recorded earlier source cuts (overlapping checks, never a count of distinct repairs). Fresh affected selection110 collected and passed8/8 in18.90s,rc0, covering the revised checker solve and omitted pytest settings. Hosted debt-src/debt-tools on f6f2a19 both completed SUCCESS; smoke/install-rehearsal were skipped, not passing runs. Source changes preserve existing current-main, tree, parent, scope, holder and storage checks.

Three real first publications (P1092/#3869, P1088/#3870, P1086/#3871) produced canonical commits and then refused final parent validation. Subsequent reads showed the expected canonical head and direct parent, but the original failed query did not log its observed forge head: production stale observation is not proved. P1092's explicit canonical recovery succeeded without another PR or commit. P1088/P1086 then exposed the other missing transition: changed mains correctly refuse recovery, while old --qualify refuses an already captured trailer.

Before / after

Before:
  UnpublishedInput -> first real carrier -> CombinedInput
  CombinedInput resumes only its unchanged frozen sources
  changed sources: refuse recovery; qualify also refuses nested metadata
  final publication validates whichever head a new forge query returns

After:
  IntegrationInput owns ordinary/captured recapture refusal/proof
  UnpublishedInput overrides the proof for a known published prospective cut
  explicit --recapture preserves that same PR and its old Git history
  IntegrationCheckout shares exact-revision merging and conflict cleanup
  IntegrationRun shares prepare_publication / finish_publication
  CombinedInput validates the expected canonical commit against one forge observation

Known-push observation

PullRequestHead.published_after observes a successful Git push without repeating it. Only the same PR's known preceding head may lag, under a five-second between-read settling deadline; each foreign command retains its existing60-second network bound. An unexpected head or read failure refuses, with expected/observed/previous identities. Creation is never retried. IntegrationInput retains one shared validation implementation, so the normal validation and publication path keep the same graph/current-main checks.

The foreign gh subprocess fixture now models lagging observations after an actual Git branch update. It does not patch Core methods. A separate control replaces the forge head unexpectedly and requires refusal. Independently read P1090 evidence (pi-toad-errors/delivery-owned/p1090-capture-publication-03.json) records push+ls-remote at6464ef0951 followed by successful gh pr view3857 returning the precedingf45f37216e. This proves stale observation for that GraphQL-backed helper call, not the three earlier unlogged publisher REST observations.

Delivery scope

This producer repair is not a prerequisite for landing reviewed source. The owner-directed dispatch landing proceeds without another capture or recapture. Existing failed roots remain evidence, not a second permission system.

Explicit same-carrier recapture

--recapture PROBLEM --from HOLDER --carrier PR is a separate explicit operation, not an implicit change to resume. It requires the storage-declared owned checkout, current project scope before checkout mutation, the actual holder/generation, the matching real publication branch and a valid published input. Source review caught the Core-main merge preceding the later scope check; the shared owned_repository boundary now performs that current scope check first. A control removes Core from the real project declaration after capture, advances Core main, and proves HEAD/remote/output remain unchanged. Ordinary/unrecorded source cannot silently become a captured carrier.

RecaptureCheckout.prepare_main supplies recapture-only integration through the shared preparation flow. Duplicate problems, invalid qualification options, companion selection and fresh output are checked before that mutation; ownership, current scope and holder/generation are refreshed immediately before it. Reused output and invalid preparation controls advance actual Core main and prove the candidate stays unchanged. The real main-advance fixture procedure is shared rather than copied across these controls.

A current Core main is integrated through the existing checkout's merge mechanism, preserving old capture ancestors. Fresh source selection still checks each main, head, tree, original parent, repository universe and permitted source. Shared prospective publication records the replacement cut; it never calls PR creation. Shared finalization records the existing link and validates the actual pushed canonical head. The old output and Git history stay intact. The local Core tree can remain identical to Core main while a real companion supplies the substantive change.

This integration-carrier merge is not a merge of main into a development feature branch. The recovery implementation branch itself is rebased onto main.

Removed duplication

The old inline prospective write/commit/push and finalization were moved to their existing owner and shared with recapture. Exact-revision merge/conflict cleanup is shared by member integration and Core-main integration. No compatibility alias, manually cleared trailer, fabricated source edit or second publication system was added.

Pytest owns omitted settings

Errors' real pyproject omits python_files, which pytest permits. TestSelection previously treated both consumer fields as required in raw TOML. It now obtains omitted values through pytest's built-in Config.getini declarations, registered by get_config. That factory imports pytest's built-in plugins but does not parse project addopts, load project plugins/conftests or collect tests. Explicit project values still pass through the same FieldCodec boundary. Empty testpaths selects the project root, as pytest does.

Pytest moves from the dev extra to runtime dependencies because the installed integration command now imports that configuration owner. uv.lock records the same declaration change; its other resolutions are unchanged. Added controls cover omitted python_files and both omitted fields, with a raising project conftest to expose unintended execution. The previously attempted tmp21 launch returned UNKNOWN during the admission/socket failure; it is retained unreplayed, with no successful execution claimed.

One checker solve carries both declared graphs

The1126aa4d80 hosted debt-src/debt-tools jobs stopped before NRA in CheckerStack.require_runtime_compatibility: moving pytest from the dev extra into runtime changed the active-runtime requirement strings. Equality of those lists is not the compatibility obligation. The existing private project now carries the captured baseline's active external edges alongside the candidate graph and its checker extras. Activation is already evaluated against the actual interpreter and requested extras; projecting a selected edge into the root removes its old parent-extra marker from a copy, leaving the backend metadata intact. UV solves the combined requirements before any sync. Existing retained source/version constraints, pip check, and observed-resolution validation against both captured graphs remain.

The15-line string-set equality check is deleted, not bypassed with a pytest exception or another environment. Controls now inspect baseline-extra projection and request one real compatible solve; the existing incompatible-solve and retained-identity controls remain. The two changed files parse successfully. These revised controls passed in fresh selection110: compatible requested/unrequested extras, incompatible graph refusal, unchanged/added runtime declarations and omitted pytest defaults,8/8 in18.90s,rc0. Old1126 red preparation results are not new-head NRA findings. The interrupted source-verdict call saved no acceptance: the retained store still showed only UnderReviewHeadVerdict for1126. A separate fetch-82 command returned UNKNOWN, with no log or matching process subsequently observed; that original command was not replayed.

Evidence epochs

  • Production failures and canonical recovery are retained separately under pi-typed-dispatch/source-publication-48, publication-inspect-49, source-recovery-50; peers retain their own originals. No prompt or creation replay.
  • Run16: 22 executed,20 passed; two controls stopped at an incorrect test exception-subclass expectation before Core-main recapture. The product ancestry refusal was correct and unchanged.
  • Run17: 9/9 passed in29.06s after correcting that oracle, including Core+companion main advancement, preserved old history/output, actual console entry, wrong holder/borrowed tree and unexpected head controls.
  • Run18:8/8 passed in26.42s, including the final single-selected-PR lookup, changed Core/companion mains, known prospective/canonical stages, actual console entry, wrong holder/borrowed tree and a different actual carrier branch.
  • Run19:2/2 passed in12.35s for revoked current scope before Core-main integration and the actual recapture console after the shared boundary correction.
  • Run20:15/15 passed in40.85s, including three new pre-mutation refusal cases and the existing changed-main, partial-publication, actual console and known-push controls.
  • Existing host TestLease, declared shared development interpreter, fresh persistent owned roots, INT timeout. No full suite or local NRA gate.
  • Last directly read installed build: Core1bb6295ea714 / Toadd7429c1dc6ac / Textual9333140a. It excludes3873. Dispatch219/1405 are separately merged and installed; installed observation06 has its own eight native controls, clean screenshot and retirement records. Neither these producer controls nor that scoped native-mailbox observation establishes universal UI latency or an ACP/provider journey.
  • Head889a's hosted jobs reached ClientTypeErrors, then refused on baseline Toad's duplicate physical_ui/tools.physical_ui module identity. Toad1421 fixed the owning mypy root at3fe422279; old failed logs remain original-baseline evidence, not a green rerun.

Assumed

  • A forge can briefly report the known preceding head after a successful push; the fixture proves this admitted case, not the unrecorded cause of the three original failures.
  • Foreign head changes and malformed/failed reads remain failures, never fallbacks.
  • Recapture is explicitly requested by the actual holder and retains prior source evidence; it grants no merge permission or test execution.
  • No protected session/input/root is replayed or retired by this source operation.

@trissim
trissim force-pushed the work/pi-typed-dispatch--P1092-publication-recovery--agent-comms branch from e6d6916 to 94b1833 Compare November 2, 2026 13:53
@trissim
trissim marked this pull request as ready for review November 2, 2026 13:53
Copilot AI balanced review requested due to automatic review settings November 2, 2026 13:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim force-pushed the work/pi-typed-dispatch--P1092-publication-recovery--agent-comms branch 2 times, most recently from 2d9dea0 to 1126aa4 Compare November 2, 2026 18:49
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

debt-tools at f6f2a19 passes.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

debt-src at f6f2a19 passes.

Warn-only, never blocks (5)
src/agent_comms/integration.py: GodClassExcess +10
src/agent_comms/head_review.py: LintFindings +1
src/agent_comms/integration.py: LintFindings +5
found LintFindings:src/agent_comms/head_review.py at src/agent_comms/head_review.py:666 (E501 Line too long (101 > 100))
found LintFindings:src/agent_comms/integration.py at src/agent_comms/integration.py:24 (E501 Line too long (104 > 100)) src/agent_comms/integration.py:51 (E501 Line too long (126 > 100)) src/agent_comms/integration.py:936 (E501 Line too long (101 > 100)) src/agent_comms/integration.py:1016 (E501 Line too long (102 > 100)) src/agent_comms/integration.py:1021 (E501 Line too long (104 > 100)) src/agent_comms/integration.py:1023 (E501 Line too long (101 > 100)) src/agent_comms/integration.py:1030 (E501 Line too long (107 > 100))

@trissim
trissim force-pushed the work/pi-typed-dispatch--P1092-publication-recovery--agent-comms branch from 889a217 to f6f2a19 Compare November 2, 2026 20:36
@trissim
trissim added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit aeb2121 Nov 2, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants