Files
PaperClipAI/doc/plans/2026-10-20-dependable-everyday-work.md
T
6dda8cc2b7 fix: preserve Stop authority and qualify complete recovery journeys (#17105)
## Thinking Path

> - Paperclip lets people manage agents that do useful work.
> - Users need complete tasks, clear questions, retained context, and
dependable recovery.
> - Separate run tests do not prove that the complete user experience
works.
> - Successful retries can hide earlier failures and missing evidence.
> - This PR extends the existing Product E2E harness with three explicit
journeys.
> - It adds a qualification checkpoint over the full retained result
pool.
> - Independent artifacts, state, rendered conversations, and delivery
receipts establish each outcome.

## Linked Issues or Issue Description

Refs #17088, #17089, and #17046. This PR repairs two Stop lifecycle
defects and combines the qualification changes previously reviewed in
#17095, #17090, and #17099. Daily operations remain with #17051. It adds
no second scheduler or recovery engine.

**What happened?**

A completed run can still leave a user without useful output, an
understandable question, or a working continuation. Existing isolated
tests and best-attempt reports do not establish the combined behavior.

**Expected behavior**

A necessary question includes its explanation and resumes once after an
answer. Stop prevents automatic continuation until the user resumes.
Restart during finalization preserves the accepted provider result and
delivers it once. Qualification requires independent evidence for six
journeys on both agents through Slack and Paperclip.

**Steps to reproduce**

List the necessary-question, followup-stop-resume, and
finalization-recovery suites using the documented selectors. Run one
exact cell with the configured model and target. Supply a private
qualification manifest to the existing report command to grade all
retained attempts. Missing proof and incomplete coverage must fail.

## What Changed

- Wake existing accounting in the same committed native Stop closure. A
receipt that arrives before closure must still settle once; incomplete
receipts remain held.
- Require a later user message before native Stop can promote earlier
saved input. Preserve those earlier messages for the authorized
resumption.
- Add explicit necessary-question cells. Verify the actual prompt and
context, answer, one bound continuation, and the delivered document link
and revision.
- Add explicit follow-up, Stop, and later resumption cells. Verify a
live owned provider turn, cancellation acknowledgement, at least five
seconds without an automatic path, retained direction and workspace
context, and an actual browser download.
- Add explicit Daytona finalization-recovery cells. Stop the owned
controller after public result acceptance and during workspace
finalization. Require the original result, restored file hash, resumed
operation, one provider turn, and one receipt-bound delivery.
- Share the receipt-based delivery observer across both recovery
journeys. Keep model prose separate from the authoritative delivered
comment identity.
- Add a 24-cell qualification checkpoint over every retained attempt.
Require three fresh candidate passes per cell and later staging proof
with exact source, runtime, model, settings, instructions, and
independent evidence.
- Reject absent or unsafe manifest evidence. Preserve failed attempts
and incomplete observations in the normal reports.
- Provide four explicit rotating daily selections. Refuse daily
selection until all required live drivers exist. Keep scheduling and
spending with the existing operations owner.
- Document the exact selectors, evidence contract, limitations, and
remaining staging work.

## Verification

- Local Product E2E support: 3,554 passed with two existing skips;
source prerequisites: 128 passed. E2E typecheck passes. The actual
file-chip and Download-control browser regression passes.
- Two real-database regressions fail before the production repair. The
stopped coordinator leaves accounting asleep after a complete receipt;
the saved queue can restart from pre-Stop input. The repaired settlement
and cancellation cohort passes 66 checks. The complete 256-case
continuation suite passes with stronger two-phase Stop expectations, and
66 native executor accounting/Stop safety cases pass. Server typecheck
passes.
- All required CI, repository build/typecheck/tests, and fresh Greptile
5/5 pass at the final head 232d3c52d0,
with no unresolved findings.
- Both actual-model necessary-question development cells passed on the
earlier recorded c4e409d819 source. This is supporting evidence for that
revision, not current qualification.
- Both fresh Stop development cells at 6036cee2f4 stopped, remained
idle, resumed once, reached Done, and settled original and successor
accounting. Their original machine grades remain failed: the observer
counted the generated file-preparation carrier as another final reply.
The corrected observer independently correlates the applied preparation
receipt with the actual attachment/comment binding. Retained-wire
diagnostic replay finds one final delivery for each model without
changing either grade. Those original failures remain retained:
https://github.com/paperclipai/paperclip/actions/runs/39644220458.
- Both fresh actual-model Stop/resume cells pass all five checks at
232d3c52d0:
https://github.com/paperclipai/paperclip/actions/runs/39647010372.
Independent inspection confirms exactly one cancelled original and one
committed successor on the same task, 5.091/5.513-second quiet intervals
before the user resumes, retained workspace/instructions/tool
identities, and one receipt-bound final response. Each visible JSON chip
opens in a tab and its Download control yields verified bytes. The
rendered reference and changed label independently reconstruct the
registered file hash and the original context hash. Both cleanups pass.
These remain local API-key/per-turn development results, not the
required staging/Slack qualification.
- Other retained Stop failures include missed active boundaries, the
real accounting admission failure, and a preparation observer that
required nativeIssueId before runtime selection. They remain recorded at
https://github.com/paperclipai/paperclip/actions/runs/39636796645 and
https://github.com/paperclipai/paperclip/actions/runs/39642060165. The
preparation observer now validates all present task IDs and still
requires selected native execution at the active checkpoint.
- The remote finalization attempt failed during image export with no
disk space before a provider started. Remote crash acceptance remains
unverified.
- Negative calibration rejects wrong or absent ownership/evidence, stale
settings, unsafe files, repeated admissions, unacknowledged Stop,
premature resumption, incomplete receipts, lost context, genuine
duplicate final replies, and missing delivery. A prepared-looking body
cannot suppress a comment; absent, rejected, foreign, or mismatched file
receipts and attachment bindings also cannot suppress it.
- Core staging/Slack drivers, 72 fresh candidate passes, deployed
staging proof, and recovery of the original user-visible task remain
incomplete. No measured reliability percentage or completed
qualification is claimed.

## Risks

These are explicit development cells. Their API-key and per-turn runs do
not qualify deployed subscription authentication, warm reuse, or Slack.
A fast provider can miss the Stop boundary; that attempt fails. The
remote crash boundary depends on independently observed public state and
an owned controller. The checkpoint is opt-in through a private manifest
and cannot replace the missing live observers. The two production
changes affect native Stop settlement and saved-input promotion. They
use the existing transaction signals and admission path. A complete
receipt can settle without another provider turn. Partial accounting and
all ownership, cleanup, pause, and budget gates remain authoritative.

## Model Used

OpenAI Codex, GPT-6 family, with repository tools and code execution.
The runtime does not expose its exact deployment ID or context-window
size. Those values are not inferred.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
Co-authored-by: Paperclip <paperclip@paperclip.ing>
2026-10-21 13:02:27 -05:00

12 KiB

Dependable everyday work

Acceptance

Codex and Claude must finish ordinary engineering tasks through both the board and Slack, including authorized repository setup, automatic continuation, questions, restart recovery, follow-ups, Stop, and accessible result delivery. Normal rollout continues. Each core cell needs three fresh successful attempts at a recorded candidate revision and deployed staging proof; failed attempts remain evidence. A provider success or a green task badge is insufficient.

Delivery and ownership

The implementation lead owns the composed journey. The first repair slice owns task-outcome presentation, monitor publication provenance, and complete question cards. The second slice owns the six Product E2E journeys and explicit daily selection, reusing the existing campaign accounting and reporting pipeline.

Boundary Required evidence State
Yielded monitor presentation Explanation retained; no false completion or duplicate question Repair and focused checks pass
Monitor conversation lineage Exact scheduling receipt; current authorization; no unrelated channel disclosure Repair and database checks pass
Free-text question card Prompt, context, and Respond visible; answers stay private Repair and database checks pass
Repository preparation Authorized context; automatic successor; retained workspace and tools Same-agent continuation repair and composed regressions pass; live proof pending
Finalization recovery Saved result survives; zero repeated completed provider turns Saved-summary repair and database checks pass
Migration and follow-ups Configuration retained and subsequent work delivered Qualification pending

Qualification matrix

Six journeys, each on Codex and Claude through Slack and the board:

  1. Repository task with independently verified accessible output.
  2. Projectless task, repository preparation, automatic continuation, output.
  3. Legacy-to-native conversion retaining configuration, followed by useful work.
  4. Necessary free-text question, answer, and exactly one continuation.
  5. Restart during finalization, recovery, and exactly one final delivery.
  6. Active follow-up, Stop, later resumption, and retained context.

Use production instructions, recorded runtime configurations, immutable remote images, isolated tasks, and a dedicated test channel. Negative checks cover revocation, forged lineage, duplicate wakes, stale settings, and restricted workspaces. Keep source, runner, model, settings, evidence, timing, cost, and attempt identity with every result. Never infer historical qualification from the presence of a fixture.

Baseline

Source base: 8b4ab65b1c3d863d282752e83307943720a5c85c. Private incident evidence stays outside the public repository. The serving container build record independently matches the source base above. Runner artifact and historical successful deployment still require independent capture. Workspace and lifecycle changes identify changed execution paths, not an established single introducing cause. The earlier staging settings regression already has a merged repair; verify it rather than duplicating that change.

Verification record

The original source fails four composed database regressions: monitor origin, yielded completion, question body, and saved-summary recovery. The initial response-resolver regression also fails independently on the original source. The repaired six-file cohort passes 148 checks against real disposable PostgreSQL, including existing monitor scheduling, revocation, and recovery boundaries. Workspace typecheck passes. Full build, full suite, review, and live qualification remain separate gates. No deployed acceptance is claimed here.

The repository repair adds current-task pending-repository eligibility and uses the existing same-agent status decision and wake queue. Five composed server suites pass 100 checks, and the shared provider continuation driver passes 12. Server typecheck passes. These results include long conversation lineages, cycles, broken ledger receipts, current-task repository ownership, and completed repository rejection. Explicit completion and review modes remain distinct from an unfinished standard-task yield. They do not establish the live matrix.

A fresh local provider pilot exposed a separate repository authorization defect: the native API retained the local-board identity while the workspace fence expected its older null representation. A native-tool/HTTP/PostgreSQL regression reproduces the rejection before the fix. The repaired authorization cohort passes 78 checks, including revoked membership, changed sponsor, and restricted child workspace cases. A committed setup blocker now ends the E2E attempt immediately instead of consuming its remaining deadline. The failed pilot remains evidence; these regressions do not replace a fresh provider run.

The next provider attempt passed that identity boundary and staged its repository, but then submitted a system blocker instead of yielding. The provider-facing completion description had omitted the saved workspace continuation. The server also accepted a repository_checkout_pending blocker that cited the exact pending repository on the active task. The repair clarifies the existing completion tool and rejects this report before acceptance with the normal yield action. It does not rewrite an accepted result or create another recovery mechanism. Real access restrictions, approvals, dependencies, paused tasks, cancelled tasks, changed run ownership, and failed or unrelated repository receipts retain their gates.

The real PostgreSQL completion regression fails before the repair. The repaired completion/context cohort passes 50 checks, the runner cohort passes 107, and E2E support checks pass 38. Server, runner, and E2E typechecks pass. Copilot v54 binds the changed shared completion guidance; v53 remains a historical identity. The three development pilot failures remain retained. These checks do not count as the required staging matrix, and a fresh provider run remains necessary.

The fourth development attempt reached a successor through a monitor fallback, then failed before provider startup while applying Git exclusions to the task root. It is a failure of the required same-agent journey, even though a successor started. The log records Git's exact non-repository error. A real-Git and database reproduction shows the same error for a declared plain task directory containing inert Git metadata. The original attempt did not retain that metadata's contents or establish which component created it.

The next narrow repair lets only an explicitly declared plain task root proceed past Git's exact non-repository result. It leaves the existing files intact. Configured checkouts keep strict validation, real Git roots still receive the exclusion, linked metadata stays rejected, and missing Git stays an error. The repair's Git and authorization cohort passes locally. Fresh provider remeasurement and the monitor-fallback defect remain open.

Two additional Product E2E journeys now cover configured repository delivery and real legacy-to-native conversion followed by verified work. Each checks a fresh fixture-owned source file, its hash and Git commit, retained configuration and instructions, the actual native provider/model, and a registered download visible after reload. A third explicit selection replays automatic repository setup with the recorded Codex and Claude models. All twelve new cells declare development API-key authentication and per-turn lifecycle differences. None counts as staging subscription, warm lifecycle, Slack, or the complete 24-cell milestone. Fresh provider measurement remains required; catalog registration is not acceptance. The fifth development attempt uses the recorded Codex model. It has no monitor, but selects a response wake and then reaches productive-continuation recovery. Its next admission still fails at Git setup. The first plain-root regression had used a task_directory strategy that the runtime does not persist. The production runtime records project_primary, task ownership, and a task_session source. A corrected real-database reproduction fails with that recorded representation. The repair now checks those current ownership/source fields and absence of a root repository or configured project source. Shared and isolated task directories are covered; configured, agent, worktree, and adapter-managed roots stay strict. The second Git helper caller was inspected, but is not established as this attempt's cause. The fifth failure remains retained, including the distinct response-wake selection. Live same-agent acceptance is still open.

That fifth attempt also exposes an independent completion-validation gap: a provider can report an unsatisfied objective, leave remainingWork empty, and yield to response_wake without any pending response. The existing gate checked only blocking remainingWork entries. A real-database reproduction accepts that invalid report before repair. The same gate now also checks an unfinished objective. Current questions, approvals, pause holds, conversations, and authorized external response waits retain their earlier checks. No accepted result is rewritten.

Review then found that shared-workspace restoration relabeled a retained task source as project_primary before repository admission. A new regression performs first workspace preparation and reuse against the real database; it fails at the source transition before repair. The corrected path retains task_session for an explicitly repository-free task directory, including its absent repository and ref instead of inheriting organizational defaults. Configured source pointers keep project classification. The composed regression also stages a repository through the real service and prepares verified bytes on the reused task root, with only remote clone transport replaced by an owned local repository. The queued sixth campaign was cancelled during its build, before provider execution, when this review finding made that candidate an uninformative paid retry.

The necessary-question journey now extends the existing continuation flow. Four explicit development cells require a visible free-text prompt and context, one real user answer retained on the unchanged question, an exactly bound provider resume or semantic successor, and an independently read exact saved confirmation with a visible link. Calibration preserves the existing continuation and question suites. These cells use production instructions and the recorded models, but retain explicit API-key/per-turn differences and do not count as Slack or staging qualification. Actual provider measurement is still required.

October 21 Stop qualification findings

The corrected live observer reached a real active provider, saved the follow-up, received the matching Stop acknowledgement, and observed the required quiet interval. A later real resume message was saved but could not start work. The retained run has a complete priced receipt with accounting still pending.

A real PostgreSQL regression reproduces the receipt-before-coordinator-closure race: the accounting worker goes idle before closure and is never signalled again. The repair adds accounting to that existing committed closure signal. It does not infer zero cost or relax budget admission. Partial receipts remain held; a later complete receipt settles one ledger entry without provider replay.

A second real-database regression shows that the old queue path could admit a follow-up saved before Stop. The repaired native path, like the legacy path, requires a later user message while preserving earlier undelivered input. Both reproduced failures remain retained. Fresh actual-model acceptance and deployed staging proof remain required before closing these repairs.