Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions LESSONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ Dated, short lessons from real FlyBot work. Agents read this **before coding**.

## Open lessons

### 2026-11-04 — Missing workerId does not define admission cleanup (Seen 1×)

Binding can fail before execute returns; register reservation ownership and cleanup
across preparation/binding/spawn. Persist the spawn fence before external effects.
Only proven pre-spawn failure permits rollback; retain unknown occupancy and original
context, and serialize late startup against reclamation.


### 2026-11-04 — An enabled schedule is not a completed inspection (Seen 1×)

A process-local waiter disappears on restart; correlate durable occurrence and Run
Expand Down
8 changes: 8 additions & 0 deletions PROJECT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ architecture lives in [docs/architecture.md](docs/architecture.md) and
Current stage and priorities: [ROADMAP.md](ROADMAP.md). How decisions are made:
[docs/governance.md](docs/governance.md). Dated decisions: [decisions/](decisions/README.md).

## Follow-up reliability delivery — 2026-11-04

Owner authorizes sequential #2336/#2337/#2334/#2346/#2338/#2347/#2331/#2342
implementation, one PR each, tests/memory/docs and validated merge to the delivery
branch. #2336 establishes owned reservation rollback and a durable pre-spawn fence;
unknown execution, workspace/context and current authority remain protected.
No live task/configuration/credential mutation or deployment is implied.

## Execution recovery — 2026-11-04

#2325 aligns actual reused SDK/resource checkouts with pinned baseline/seed facts,
Expand Down
146 changes: 22 additions & 124 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# FlyBot — Roadmap

## Follow-up reliability — 2026-11-04

Implement #2336 reservation cleanup first; then #2337 CLI configuration, #2334
environment attribution, #2346 context migration, #2338 receipts, #2347 recovery
routing, #2331 controlled merge and #2342 operational-agent collaboration. Separate
PRs retain existing UI/control-plane, authority and exact exit/evidence contracts.

## Recovery delivery — 2026-11-04

Implement and merge #2325 → #2327 → #2328 → #2330 sequentially into
Expand Down Expand Up @@ -52,41 +59,11 @@ Vendor-specific adapters and live external-provider acceptance remain separate.
Backend delivery does not complete original frontend #41 acceptance
or merge staged PRs.

S6/#55 integrates current service stages with original native frontend work and
adds repeatable isolated fault/replay acceptance. Actual PR feedback→original Task→
Codex Dev→Tester has run; final candidate/Review/Chief evidence and compatible UI
rollout are recorded separately. Do not replace #41 or claim its whole visual/
dual-mode matrix from this backend service acceptance.

S5/#54 adds the trusted-private compatibility profile and execution-boundary query,
without per-Bot OS infrastructure or live identity/sandbox migration. Current-role,
safe/watch, private-data and concurrency regression suites guard existing rights.
Exact-head full checks and dedicated-account metadata probes are separate from
S6/#55 integrated GitHub/SDK/recovery/UI acceptance, which remains required.

S4/#53 implements scoped GitHub feedback→existing Task inputs with persistent
revisions, bounded source sweeps and native schedule configuration. Full exact-head
verification, compatible checkpoint rollout and actual GitHub→Bot handoff evidence
must precede delivery claims. S5/#54 trust/capability boundary and S6/#55 integrated
fault/recovery acceptance follow. S1–S3/#60 are deployed; original frontend Task40/
PR48 now advances its new sealed candidate through native Tester/Reviewer roles.

Immediate #60 foreground repair completes approved extra-merge host sealing before
S2/S3 batch rollout and current frontend Attempt resumption. Keep the existing
index/MERGE_HEAD, shared-ref restriction, Task/PR and independent candidate gates.
The first batch is deployed; live source admission found a historical-Chief
scope regression. PR62 includes its real-state reproduction and focused guard
repair before resuming the original frontend Attempt. No full frontend acceptance yet.

Service #49 implementation order: S1/#50 (PR56, deployed), S2/#51 (PR58, verified,
awaiting compatible batch rollout), S3/#52 (PR61,4374 checks and real Codex receipt/pool acceptance verified), then source subscriptions/#53, trusted execution boundary/#54 and
integrated fault/recovery acceptance/#55. #57/PR59 compatibility repair is deployed;
original Chief resumed actual frontend Dev without changing Task40/PR48 ownership.
Each stage keeps memory, architecture and regression evidence with its own PR.

Immediate compatibility repair #57 removes the verified prior-invocation workspace
and Session resumption blocker before continuing service #51–#55. Preserve the
current frontend Task/Attempt/PR and unknown-exit protections.
Earlier service chronology are [preserved in the dated history](docs/history/2026-11-04-earlier-delivery-roadmap.md).
Current authorization, Task/Session/role constraints and original capability compatibility
remain in PROJECT.md and canonical subsystem contracts. Historical test evidence does
not complete outstanding real-provider, mixed-resource, release or frontend acceptance;
no new deployment, privilege expansion or automatic mission change is authorized.

Current execution order (Owner update, 2026-11-01): keep the existing frontend
#40 Task/PR48 autonomous while implementing backend #49–#55 directly in the
Expand All @@ -98,53 +75,11 @@ live integration, frontend restoration and R8 acceptance retain their existing
issues; no passing unit suite alone completes them.


The owner-approved plan is [fork #1](https://github.com/zy95-12/FlyBot/issues/1), recorded
in [the fork decision](decisions/2026-10-31-project-first-fork.md). Historical upstream
stages below do not restrict the fork's approved Project and frontend refactor.

| Milestone | Deliverable | Status / issue |
| --- | --- | --- |
| M0 | Isolated DSH/tool/cwd/lifecycle and unchanged-platform HTTP checks | Merged PR #9; [#2](https://github.com/zy95-12/FlyBot/issues/2) |
| M1 | Project domain and direct Task/Run/Workspace ownership | PR #10 verified locally, awaiting review; [#3](https://github.com/zy95-12/FlyBot/issues/3) |
| M2 | Shared membership, platform identity adapter and backend authorization | PR #11 verified locally, awaiting review; [#4](https://github.com/zy95-12/FlyBot/issues/4) |
| M3 | Worktree, code/tests/PR/review evidence and human acceptance | PR #13 locally verified; integrated real-provider acceptance passed in M6; [#5](https://github.com/zy95-12/FlyBot/issues/5) |
| M4 | Public project Bots and private user/project agents | PR #14 verified locally, awaiting review; [#6](https://github.com/zy95-12/FlyBot/issues/6) |
| M5 | Rebuild task navigation, Project board, details and resource view | PR #15 locally verified, awaiting review; [#7](https://github.com/zy95-12/FlyBot/issues/7) |
| M6 | Repeatable two-user end-to-end acceptance | PR #16: real-model/GitHub/browser acceptance passed; awaiting review; [#8](https://github.com/zy95-12/FlyBot/issues/8) |

The owner authorized sequential M1–M6 implementation, one PR per milestone. Each PR
updates long-term memory, architecture and tests. Merge status is tracked separately.

Reuse platform services unchanged first; new project logic/adapters belong in FlyBot.
M0's deterministic model and existing shared-write denials do not imply M2/M3 completion.
GPU pools, multi-host scheduling, auto-merge and exact crash resume remain deferred.
The 30–43 person-day estimate is provisional pending interfaces/frontend design.

## Authorized M7 sequence

| Phase | Deliverable | State |
| --- | --- | --- |
| [M7.1 #21](https://github.com/zy95-12/FlyBot/issues/21) | Durable Chief/role memory and temporary Session snapshots | PR #26; full verify and actual DSH context checks passed |
| [M7.2 #22](https://github.com/zy95-12/FlyBot/issues/22) | Execution resource registry, candidate pools and leases | PR #27; full verify + actual local/Docker probe; integration #30 |
| [M7.3 #23](https://github.com/zy95-12/FlyBot/issues/23) | Native/Codex/Claude Agent SDK adapters | Draft PR #28; full verify passed; real authorization acceptance pending |
| [M7.4 #24](https://github.com/zy95-12/FlyBot/issues/24) | Owner configuration, probes and authorized resource terminal | Draft PR #29; full verify + actual PTY checks; browser integration #30 |
| [M7.5 #25](https://github.com/zy95-12/FlyBot/issues/25) | Cross-resource code/evidence transfer and real browser acceptance | Draft PR #30; code/resource/browser checks implemented, authenticated mixed-Harness acceptance pending |

User explicitly authorized sequential implementation and a separate PR for every issue,
including long-term memory, architecture and tests. Merge/deployment is separate.

## Automatic development service sequence

[#49](https://github.com/zy95-12/FlyBot/issues/49) tracks S1 #50 service/TaskView →
S2 #51 durable Effects/outbox → S3 #52 input/role receipts → S4 #53 external
Task subscriptions. S5 #54 trusted deployment/authority follows S1 and applies
throughout; S6 #55 integrated recovery acceptance follows all five. One PR per
implementation issue; no extra tracking-only PR. S1 PR56 has a deployed initial facade (673c741b); long-history follow-up
b9cceb02 passed full4333 verification, deployed at a released checkpoint and
passed three-account scoped HTTP/pagination checks, preserving original UI bytes.
S2/#51 effect/outbox code and fault regressions are implemented; full verification
and source-bound rollout follow before S3 inputs/read receipts.
Independent repository review is not claimed. Original #34–#41 residuals remain.
Earlier M0–M7 and service checkpoints are [preserved in the dated history](docs/history/2026-11-04-earlier-delivery-roadmap.md).
Current authorization, Task/Session/role constraints and original capability compatibility
remain in PROJECT.md and canonical subsystem contracts. Historical test evidence does
not complete outstanding real-provider, mixed-resource, release or frontend acceptance;
no new deployment, privilege expansion or automatic mission change is authorized.

## Historical upstream roadmap

Expand Down Expand Up @@ -250,48 +185,11 @@ in-process service and incomplete real watch/UI acceptance remain explicit; no
standalone frontend, OpenAPI service or runtime migration is implied.


### Backend convergence #2184 — 2026-11-03

SDK Task-role binding hardening: pinned shared definition snapshots, latest observed
partial-thread recovery, verified legacy-key adoption, durable dispatch intent,
explicit incompatible recovery, current rights/resource checks and truthful adapter
capabilities. Native Task-role context restoration, parent waits, transactional Effects
and external command receipts remain dependent acceptance; no live-provider or deploy
claim from controlled process tests. README/API rewrite remains last (#2189).


### Collaboration contract convergence — 2026-11-03 (#2175)

Expose durable Task handoffs through one scoped contract projection, with distinct
pending/accepted/processed/revoked/invalidated states, source/target context references,
actual claim/worker binding, initiative fences and predecessor/successor history.
Idempotent trusted offer/accept ports reuse pools; unresolved old writers cannot be
bypassed by Chief rerouting to another resource. Consultation is a separate private
protocol over retained transcripts, without Task creation or initiative transfer.
Chief prefers an active personal agent for user questions: safe answers require user
publication, watch answers use existing inbox rights; only committed Effects may wake
an authorized native watch. External clients have isolated mailboxes, not fabricated
provider sessions. SDK process/HTTP tests and real-provider acceptance remain distinct.
Native restoration/context bounds, transaction events and parent waits stay on their
original dependent issues; no control-plane, deployment or frontend changes.


### Context/memory convergence — 2026-11-03 (#2177)

Unify model/Harness context budgeting and bounded source tools across persistent
Chief and temporary roles. Unknown capacity stays explicit; full rules/current
constraints remain required, retrieval yields before overflow, and native/SDK input
is checked before delivery. Working summaries use original public role-memory
records with exact source/evidence/uncertainty, separate resident Chief topics and
rollback of uncommitted staging. Facts have source/classification/version/archive;
role-authored experience cannot declare facts or overwrite human control. Private
notes retain history under bounded views. Codex tool history has an explicit cap;
SDK compaction remains runtime-managed, without claiming aggregate usage is current
window pressure. No new memory platform, executor or timer. Native Task-role physical
restore2184 and normalized SQL storage2182 remain separate acceptance; real SDK
verification must name exact runtime source hashes, not borrow deterministic tests.

#2177 follow-up: validate two sequential native Chief jobs against fresh per-turn facts while retaining the same resident Session; dependent Task admission runtime acceptance remains #2179.
Earlier convergence implementation notes are [preserved in the dated history](docs/history/2026-11-04-earlier-delivery-roadmap.md).
Current authorization, Task/Session/role constraints and original capability compatibility
remain in PROJECT.md and canonical subsystem contracts. Historical test evidence does
not complete outstanding real-provider, mixed-resource, release or frontend acceptance;
no new deployment, privilege expansion or automatic mission change is authorized.

### Completed convergence checkpoints

Expand Down
1 change: 1 addition & 0 deletions changelog.d/2336.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reclaim proven orphan reservations and roll back SDK admission failures before external spawn. Preserve unknown execution capacity, original Task-role context and workspaces with durable ownership/startup evidence.
7 changes: 7 additions & 0 deletions core/src/host/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,13 @@ export function install(rt) {
ready({ task, definition }) {
try { rt.projectResources.plan(task.projectId, { roles: [definition] }); return true } catch { return false }
},
async abort({ task, claim, reason }) {
const attempt = rt.state.projectAttempts?.[claim.attemptId]
for (const session of Object.values(attempt?.roleSessions ?? {})) if (session.poolClaimId === claim.id && session.botId) {
try { await lifecycle.release(session.botId) } catch { /* Do not assume unknown exit. */ }
}
return rt.projectDelivery.abortPoolAdmission(task, claim, reason)
},
async execute({ task, claim, definition }) { return lifecycle.spawn(await rt.projectDelivery.preparePoolRole(task, claim, definition)) },
async dispatch({ task, claim, workerId }) {
const taskInbox = await rt.projectInputs?.prepare(task.id, claim)
Expand Down
Loading
Loading