Repository navigation
docs: reconcile the documentation corpus; fix the recurring CI flake sources - #1311
Merged
Merged
Conversation
Audited every failed `ci.yml` job in the last 200 runs (48 runs, 144 failed jobs) and grouped the failures by test. Most were already fixed by #1293, #1305 and #1309; this is the residual set with an established cause. remote/host: an expired reply slot is replaced on read, not only by its timer. The single-flight cache scheduled retirement through the Host executor, and that path is best-effort: `runtime::spawn` drops the future outright when task admission is closed, and the registry's timer can be cancelled by a fixture in the same binary. A lost timer then served a cached reply forever — the test that waits on the real eviction reported `Elapsed(())` on `Shared host (Windows)` in runs 39437825835, 39440217807, 39526548081 and 39540018985. `CachedReply` now carries its own deadline: a read past it replaces the entry, so a retry executes instead of receiving a retired reply, and the timer is only reclamation. A slot still executing is never replaced (`prompt` runs for its 600 s TTL), so single-flight is unchanged. The two host fixtures assert the contract — an expired id re-executes — instead of waiting on the process-global task registry. host/remote: the two bridge fixtures that took no lock now hold the HOME fixture. The control gate consults the process-global `SUPERVISOR`, which every bridge fixture start re-points at its own pairing, so a fixture with no lock at all clobbered whichever test was mid-command: `declared_capability_reaches_the_running_command_loop` received `{"success":false,"error":"superseded"}` in runs 39724323762 and 39540018985. With both fixtures holding the lock every bridge test in the binary serialises on it (the rest already did). channels/qq: ack the gateway heartbeat when the first heartbeat is *recorded* rather than after a fixed 130 ms. With a 90 ms interval the ack raced the next interval on a loaded runner and the gateway reported "not acknowledged" (run 39742523871). The interval is 300 ms and the ack is ordered on the frame, so the ack has a whole interval to be read. agent: the no-progress journal failure is eventual (batch window + worker thread), not synchronous; its 500 ms poll failed once on main (run 39767494038). Five seconds still fails a journal that never reports. cli (Windows): a console that goes away with the child is not a delivery fault. `SetConsoleCtrlHandler(NULL, TRUE)` fails once the target's console is gone, and the old assertion reported that as a broken Ctrl+C (runs 39576790228, 39474870891). Both calls now treat an already-exited target as "interrupt moot" — the same rule the attach above them already uses — and still fail loudly while the child is alive. mobile: the `SessionList` setup hook renders once and flushes one microtask; the 5 s Jest default measured the machine (`Exceeded timeout of 5000 ms for a hook`, run 39742523871) while the whole suite runs in one worker. A 30 s budget only keeps a real hang from wedging the suite. desktop: `acquire_transaction_lease` reported every `try_lock_exclusive` error as "Another update transaction is active". Only `WouldBlock` is a concurrent transaction now; anything else surfaces its own message, which is what the unexplained first-`begin` failure in a fresh directory (run 39767494038, 1 round in 6 measured in #1305) needed to be diagnosed.
…sockets `a_supervisor_gives_up_after_its_window` asserted that the fake broker had accepted exactly 18 connections. The broker counts sockets, not retries: a leftover loop reaching the listener, a reused ephemeral port or any extra dialling source moves that number without moving the retry policy, and a CI run reported 34 accepted for an 18-attempt budget. Count the retry itself: the supervisor records one increment immediately before each `resume`, in the test-only `retry_attempts` map (per host, so two loops for one host would exceed the budget instead of agreeing with it), and the test asserts `dispatched == reconnect_attempt_budget()` with the budget's value pinned at 18. The socket counter stays as a diagnostic and as proof the loop reached the broker. Also retire a superseded loop in `install_supervisor_for_test`: overwriting the map entry left the old loop running with no owner to abort it, which is how a host could be dialled by two loops. Pinned by `a_second_install_retires_the_first_retry_loop`.
A full pass over every live document, checking three things: does it match the code, does it still carry narration about states that no longer exist, and is anything shipped but undocumented. Against the code: the approval tier is four values (off/manual/sandbox/auto), not three, in README, SECURITY, the wiki and desktop/CLAUDE.md; desktop/CLAUDE.md's Store, Shadow Review and provider-validation paths moved to host/; `make test` is eight suites and `make fmt` does not format mobile; the architecture docs gave the task executor to the desktop when it lives in future-host; the goal CLI has 43 commands in 7 groups, not 41 in 5; the protocol is 2 and the agent schema 7, not 1 and 6; the rpc crate's module list was missing twelve modules; auto_connect_remote and skill_recommend defaults were inverted; the TUI now hosts the agent in-process and the supervision doc still called that undecided; the wiki's Settings/Remote/Sandbox pages described a Phone Control tab and a "Pair and start" button that no longer exist; Bubblewrap compatibility is a runtime probe, not a 0.9.0 floor; the channel and schema-inventory docs had drifted from their tables. Against historical pollution: dropped the loop group (removed from the CLI), the TypeScript RPC client and its npm package, migration notes for long-finished refactors, "this branch"/"this pass"/PR-time narration, and the old-layout breadcrumbs in the docs index. New documents for real gaps: future data backup and recovery had only a section inside the storage-migration doc; agent/ and host/ had no module map; scheduled tasks shipped with no wiki page at all. Also added the missing Models navigation and the testing-record index entries.
- CLI wiki page (en/zh): `## See also` now links the guides behind `future host`, `future relay`, `future task` and `future data` — host mode, the self-hosted relay, `architecture/tasks.md` and `architecture/sqlite-migration.md`. The seven missing command entries and the removal of the deleted `loop` group were already in place on the branch. - Root README (en/zh): one feature-table row states that `future relay init|serve` runs the relay behind remote control without a FutureOS account in the path (evidence: `cli/src/main.rs:44`, `cli/src/help.rs:36`, `cli/src/relay/cli.rs:77-78`, `docs/guide/self-hosted-relay.md`). - `docs/testing/README.md` + `.zh-CN.md`: the `headless-*.json` row described only the two CI/baseline payloads, while 57 of the 63 `headless-*.json` files are per-change acceptance payloads (`baseCommit`, `change`, `testOwnership`, `localTests`, `limits`); the row now says so. - `cli/src/main.rs`: the module comment claimed the standalone binaries "remain installed and usable directly". `Makefile` `install`/`install-cli`/ `install-desktop` place only `future` and `futureos`, so it now says they stay `cargo build -p <crate>` targets. Comment only, no logic change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reconciles the documentation corpus with the code it describes, and fixes the
remaining recurring CI flake sources at their causes instead of around them.
Most of the diff (95 of 107 files) is documentation; the code changes are a
reply-cache deadline, supervisor retry instrumentation and fixture locking.
Commits
What changed
make testsuite count, architecture ownership, goal CLIcommand count, protocol/schema versions and rpc module list now match the
code; historical narration ("this branch", removed
loopgroup, the retiredTypeScript RPC client) is gone from the live docs.
expired slot is replaced on read instead of depending on a best-effort
retirement timer that a cancelled spawn or a fixture's registry reset could
drop.
(
dispatched == reconnect_attempt_budget()) instead of accepted sockets, andre-installing a supervisor retires the previous loop.
the process-global supervisor another test is mid-command on.
Verification
Local, on the pinned toolchain (rustc 1.97.0), at the frozen tip:
cargo fmt --all -- --check— clean;cargo fmt --checkindesktop/src-tauri— cleancargo clippy -p future-agent -p future-channel -p future-cli -p future-host -p future-remote-client -p future-remote-server --all-targets -- -D warnings— clean
cargo test -p future-agent --lib -- broadcaster— 51 passedcargo test -p future-channel --lib -- qq— 53 passedcargo test -p future-host --lib -- remote_peer— 132 passedcargo test -p future-host --lib -- remote_host::business::tasks— 20 passedcargo test -p future-remote-client --lib— 64 passedcargo test -p future-remote-server --lib -- commands— 7 passedcargo test -p future-cli --test remote_start_refusal— 14 passednpx jest src/screens/__tests__/SessionList.test.ts(mobile) — 78 passedcargo clippy -p futureoswas not run: the GUI dependency build does not fitthe self-test budget, and the only
src-taurichange is insideupdate_journaltest helpers (fmt clean, covered by CI).
Notes
No migrations, no flag or default changes reachable from here;
cli/src/main.rschanges are module-comment text only.