Skip to content

Retain installer failure results and map crashes to Core source - #2888

Merged
trissim merged 5 commits into
mainfrom
fix/p404-retained-failure-outcomes
Oct 23, 2026
Merged

trissim merged 5 commits into
mainfrom
fix/p404-retained-failure-outcomes

Conversation

@trissim

@trissim trissim commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #2556. Two implementation commits port its remaining reporting changes; merge bunched with current main e93892c without conflicts. Keep #2556 open until this merges.

  • 55ca03ffd, installer/launch.py:76-87,93: select the last Core traceback frame and map it through Repo.module_file using the TargetTree's source repository. Preserve exception type/message and the original line number.
  • 944499c40, installer/launch.py:59-61,99-105, installer/reporting.py:32-63, installer/upgrade.py:342,365,828: retain a returned LiveRun before bridge resumption/worker retirement/harness registration, and keep it when recording a failure. The existing result variants supply live lines; rehearsals invent no live result. Existing bridge output and writer selection stay with their owners. A failed report publication still annotates and rethrows the original exception.

#2556 remainder: no additional functional P404 change remains to port. Comparison used its original 46391711d...c6cd8d4f9 diff (12 production files and 8 test/support files), checked against this head:

Old draft work Current owner or replacement
InstallReport lifetime across tree cleanup; runtime-owned publication #2620 and subsequent worker changes: installer/launch.py:90-107; installer/reporting.py:78-84
Bridge outcome variants and resumption on a later failure #2713: cli_bridges/shared.py:610-710; installer/upgrade.py:824-831
Watch discovery independent of --state #2620: agent_comms_hooks/watch.py:82-84; cli_bridges/shared.py:560-572
BoundListener/readiness wrapper #2722 replaced it with SystemdSite.start, host_services/init.py:31-42; no extra witness is needed
Absolute install/repository/scratch paths #2722 and current PathText owners: field_codec.py:1330; cli_commands.py:1681,1710; commander/config.py GivenRepos.from_wire
Class-factory lookup through MroDispatch #2713's current MroDispatch.handler_for, mro_dispatch.py:59; FieldCodec uses it at field_codec.py:832,899 rather than adding the old class_handlers_for adapter
Fresh/retiring creation, post-carry writer permission, captured home Existing FreshInstall/RetiringInstall inheritance, installer/upgrade.py:1052,1092; RuntimeWriter selection at :1019,:1048,:1079; Stack.home uses a factory
Nominal failed result and Core source location These two commits in #2888

The old permanent InstallFailure/CarriedInstallError/SourceWriter alternatives are not needed to preserve those outcomes under the current ownership. Do not restore the old writer hierarchy, CommanderConfig class or outcome.py module. The eight old test/support diffs are historical verification code, not additional production features; the review fork owns current execution checks.

Source inventory used refactor-audit Package.load: 449 Core modules, 486 test modules and 11 tool modules at the fresh base, zero parse omissions. Changed modules parse through AST; git diff --check is clean. No tests, practice installs or local ratchets ran in Drafts.

Assumed: errors crossing InstallReport.running contain a Core traceback frame; Repo.module_file owns Core's source layout; only returned LiveRun values are retained and partial/rolled-back work keeps its existing failure description; existing writer and bridge ownership remain authoritative. Source evidence is not an execution result.

Send-back fixed: c60cd15 failed the review fork with 7 failed / 10 passed because I read nonexistent TargetTree.checkout. The correction constructs Repo from the declared TargetTree.path (upgrade.py:625); no alias, fallback or exception handler was added. The AST inventory never proved attribute existence, and the earlier source-parsing statement was not execution evidence. The review fork reruns the two files; Drafts ran no tests.

Attribute reads checked by opening the declarations:

Read Declaring owner
tree.path installer/upgrade.py:625, derived from scratch/revision declared at :620-621
report.record_live installer/launch.py:59; report parameter is InstallReport at installer/upgrade.py:815
self.live(rehearsal, report) Install.live, installer/upgrade.py:834
ObservedInstall.live.lines field installer/reporting.py:35; LiveRun.lines at installer/upgrade.py:284
InstalledUpgrade.live.lines field installer/upgrade.py:364; LiveRun.lines at :284
FinishedInstall.result.live_lines field installer/reporting.py:43; RehearsedUpgrade.live_lines at installer/upgrade.py:351, InstalledUpgrade override :374
FailedInstall.previous.live_lines field installer/reporting.py:56; InstallOutcome.live_lines at :20
self.source.module_file field installer/launch.py:57; Repo.module_file at repo.py:103; Repo.source default at :75
CorePackage.repository installer/runtime_resolution.py:41
self.outcome.lines field installer/launch.py:55; InstallOutcome.lines at installer/reporting.py:17
self.bridges.lines field installer/launch.py:56; SessionBridgeResumes.lines at cli_bridges/shared.py:707
frame.filename / frame.lineno Python traceback.FrameSummary, /usr/lib/python3.14/traceback.py:292, assigned at :307-308
agent_comms.file import machinery sets module.file from its spec: /usr/lib/python3.14/importlib/_bootstrap.py:796

Assumed after correction: errors crossing running contain a Core traceback frame; the declared Repo source layout maps that frame after tree deletion; only returned live results are retained. The accessed project attributes above are source-confirmed declarations, not assumptions. No tests were run by Drafts.

@trissim
trissim marked this pull request as ready for review October 23, 2026 20:24
Copilot AI balanced review requested due to automatic review settings October 23, 2026 20:24

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.

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.

@github-actions

Copy link
Copy Markdown

debt-src at e626852, every finding:

grew TypeErrors:src/agent_comms/installer/launch.py +1

@trissim
trissim merged commit fae2399 into main Oct 23, 2026
6 of 8 checks passed
trissim added a commit that referenced this pull request Oct 23, 2026
…sult through

Merge origin/main (#2888 retained failure outcomes) and finish the
second send-back on #2841.

- ProbePhase(probe: type[RuntimeProbe]), CarryPhase(operation:
  type[CarryOperation]), new CarryStepPhase(step: type[Carry]) and
  OwnersPhase(command: type[CliCommand]) hold the class itself. Each is
  declared beside the family it names; FieldCodec carries it as the
  declared name and decodes it back to the class. label() reads the
  declared name through subject() only when the report renders it.
- InstallRun.launch writes the child's result verbatim again, as on
  main. The old installed runtime decoding the target's
  RehearsedUpgrade could not resolve a probe or carry step it predates
  ("Unknown RuntimeProbe name"), so InstallerProcessPhase and the
  launcher include are deleted; the launcher's own phases still reach
  the child through InstallRun.phases.
- Ruff findings the branch added are cleared; black on
  interpreter_operation.py and carry.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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