@ckanner/flywheel 0.31.0 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -5
- package/CONTRIBUTING.md +19 -0
- package/LICENSE +21 -0
- package/README.en.md +4 -171
- package/README.md +152 -269
- package/README.zh-CN.md +116 -0
- package/bin/flywheel-claude-code-pro-worker.js +1 -1
- package/bin/flywheel-codex-pro-worker.js +1 -1
- package/bin/flywheel-dsh-worker.js +1 -1
- package/bin/flywheel.js +1 -1
- package/bin/runtime.js +1 -1
- package/docs/README.md +84 -0
- package/docs/README.zh-CN.md +64 -0
- package/docs/archive/README.md +13 -0
- package/docs/archive/codex-pro-adapter-handoff.md +197 -0
- package/docs/archive/design-v0.24.md +540 -0
- package/docs/design.md +681 -0
- package/docs/en/claude-code-pro.md +25 -16
- package/docs/en/configuration.md +306 -141
- package/docs/en/contributing.md +303 -0
- package/docs/en/flow-console.md +67 -13
- package/docs/en/getting-started.md +232 -126
- package/docs/en/investigation.md +219 -0
- package/docs/en/jev-shadow.md +67 -0
- package/docs/en/model-policy.md +147 -62
- package/docs/en/releasing.md +207 -0
- package/docs/en/session-evaluation.md +4 -2
- package/docs/en/session-recovery.md +49 -6
- package/docs/en/workflow.md +222 -114
- package/docs/evaluation/README.md +12 -0
- package/docs/evaluation/jev-historical-provisional.json +138 -0
- package/docs/evaluation/jev-historical-result-2026-11-10.json +174 -0
- package/docs/plans/2026-11-01-dsh-integration.md +67 -0
- package/docs/plans/2026-11-01-model-profiles-preflight.md +29 -0
- package/docs/plans/2026-11-01-npm-installation.md +19 -0
- package/docs/plans/2026-11-03-codex-pro-default.md +28 -0
- package/docs/plans/2026-11-06-adaptive-workflow.md +365 -0
- package/docs/plans/2026-11-07-session-lifecycle.en.md +424 -0
- package/docs/plans/2026-11-07-session-lifecycle.md +337 -0
- package/docs/plans/2026-11-08-flow-console.md +271 -0
- package/docs/plans/2026-11-10-jev-shadow.md +32 -0
- package/docs/plans/2026-11-10-task-discovery.md +17 -0
- package/docs/plans/2026-11-10-workbench-redesign.md +19 -0
- package/docs/plans/2026-11-12-feedback-driven-workflows.md +739 -0
- package/docs/plans/README.md +22 -0
- package/docs/reviews/2026-08-24-v0.18-review-fixplan.md +265 -0
- package/docs/reviews/2026-09-12-pr4-pr5-review.md +70 -0
- package/docs/reviews/README.md +12 -0
- package/docs/validation/2026-11-01-npm-installation.md +105 -0
- package/docs/validation/2026-11-01-profiles-preflight.md +67 -0
- package/docs/validation/2026-11-01-results.md +114 -0
- package/docs/validation/2026-11-03-codex-pro-default.md +90 -0
- package/docs/validation/2026-11-04-dsh-native-view.md +85 -0
- package/docs/validation/2026-11-04-release-0.28.1.md +33 -0
- package/docs/validation/2026-11-04-release-0.28.2.md +35 -0
- package/docs/validation/2026-11-05-dsh-0.2.2-compatibility.md +26 -0
- package/docs/validation/2026-11-05-registry-smoke-recovery.md +26 -0
- package/docs/validation/2026-11-05-release-0.28.3.md +32 -0
- package/docs/validation/2026-11-05-subscription-model-access.md +60 -0
- package/docs/validation/2026-11-05-view-order.md +14 -0
- package/docs/validation/2026-11-07-adaptive-workflow.md +79 -0
- package/docs/validation/2026-11-07-claude-code-pro.md +144 -0
- package/docs/validation/2026-11-07-session-lifecycle.md +136 -0
- package/docs/validation/2026-11-08-session-p3-p4.md +99 -0
- package/docs/validation/2026-11-09-flow-console.md +81 -0
- package/docs/validation/2026-11-10-jev-shadow.md +50 -0
- package/docs/validation/2026-11-10-task-discovery.md +45 -0
- package/docs/validation/2026-11-10-workbench-redesign.md +54 -0
- package/docs/validation/2026-11-11-release-0.30.2.md +65 -0
- package/docs/validation/2026-11-11-release-0.31.0.md +46 -0
- package/docs/validation/2026-11-12-dsh-0.2.2-rc.2.md +58 -0
- package/docs/validation/2026-11-12-feedback-driven-workflows.md +187 -0
- package/docs/validation/README.md +41 -0
- package/docs/validation/evidence/2026-11-08-session-p3-p4.json +5430 -0
- package/docs/validation/evidence/claude-node-bridges.txt +118 -0
- package/docs/validation/evidence/claude-npm-build.txt +15 -0
- package/docs/validation/evidence/claude-npm-candidate.json +54 -0
- package/docs/validation/evidence/claude-npm-install.txt +21 -0
- package/docs/validation/evidence/claude-npm-tests.txt +145 -0
- package/docs/validation/evidence/claude-plugin-tests.txt +205 -0
- package/docs/validation/evidence/claude-quality-gate.txt +29 -0
- package/docs/validation/evidence/claude-race.txt +7 -0
- package/docs/validation/evidence/codex-pro-070-probes.txt +4 -0
- package/docs/validation/evidence/dsh-bridge.txt +4 -0
- package/docs/validation/evidence/dsh-native-view-bridge-tests.txt +1 -0
- package/docs/validation/evidence/dsh-native-view-build.txt +15 -0
- package/docs/validation/evidence/dsh-native-view-candidate.json +54 -0
- package/docs/validation/evidence/dsh-native-view-inspect.txt +27 -0
- package/docs/validation/evidence/dsh-native-view-install-tests.txt +19 -0
- package/docs/validation/evidence/dsh-native-view-npm-tests.txt +143 -0
- package/docs/validation/evidence/dsh-native-view-plugin-tests.txt +99 -0
- package/docs/validation/evidence/dsh-native-view-quality-gate.txt +29 -0
- package/docs/validation/evidence/dsh-plugin-tests.txt +48 -0
- package/docs/validation/evidence/function-coverage.txt +378 -0
- package/docs/validation/evidence/npm-build.txt +13 -0
- package/docs/validation/evidence/npm-contract-tests.txt +65 -0
- package/docs/validation/evidence/npm-dsh-bridge.txt +18 -0
- package/docs/validation/evidence/npm-dsh-plugin-tests.txt +62 -0
- package/docs/validation/evidence/npm-function-coverage.txt +420 -0
- package/docs/validation/evidence/npm-install-tests.txt +20 -0
- package/docs/validation/evidence/npm-quality-gate.txt +29 -0
- package/docs/validation/evidence/npm-race.txt +7 -0
- package/docs/validation/evidence/pr-dsh-bridge.txt +4 -0
- package/docs/validation/evidence/pr-dsh-plugin-tests.txt +48 -0
- package/docs/validation/evidence/pr-function-coverage.txt +379 -0
- package/docs/validation/evidence/pr-quality-gate.txt +28 -0
- package/docs/validation/evidence/pr-race.txt +6 -0
- package/docs/validation/evidence/profiles-control-smoke.json +1 -0
- package/docs/validation/evidence/profiles-dsh-bridge.txt +18 -0
- package/docs/validation/evidence/profiles-dsh-plugin-tests.txt +59 -0
- package/docs/validation/evidence/profiles-function-coverage.txt +411 -0
- package/docs/validation/evidence/profiles-quality-gate.txt +29 -0
- package/docs/validation/evidence/profiles-race.txt +7 -0
- package/docs/validation/evidence/quality-gate.txt +28 -0
- package/docs/validation/evidence/race.txt +6 -0
- package/docs/validation/evidence/watchdog-startup-after.txt +2 -0
- package/docs/validation/evidence/watchdog-startup-before.txt +6 -0
- package/docs/validation/evidence/watchdog-startup-quality-gate.txt +29 -0
- package/docs/validation/evidence/watchdog-startup-race.txt +7 -0
- package/docs/{claude-code-pro.md → zh-CN/claude-code-pro.md} +23 -17
- package/docs/{configuration.md → zh-CN/configuration.md} +323 -139
- package/docs/zh-CN/contributing.md +240 -0
- package/docs/{flow-console.md → zh-CN/flow-console.md} +55 -12
- package/docs/zh-CN/getting-started.md +352 -0
- package/docs/zh-CN/investigation.md +182 -0
- package/docs/zh-CN/jev-shadow.md +79 -0
- package/docs/zh-CN/model-policy.md +123 -0
- package/docs/zh-CN/releasing.md +120 -0
- package/docs/{session-evaluation.md → zh-CN/session-evaluation.md} +4 -2
- package/docs/{session-recovery.md → zh-CN/session-recovery.md} +46 -12
- package/docs/zh-CN/workflow.md +270 -0
- package/npm/install.js +1 -1
- package/package.json +12 -25
- package/docs/getting-started.md +0 -418
- package/docs/model-policy.md +0 -65
- package/docs/workflow.md +0 -314
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Releasing Flywheel
|
|
2
|
+
|
|
3
|
+
[Documentation](../README.md) · English · [简体中文](../zh-CN/releasing.md)
|
|
4
|
+
|
|
5
|
+
This runbook is for maintainers. Users should follow
|
|
6
|
+
[getting started](getting-started.md). A source commit, GitHub Release, or
|
|
7
|
+
successful `npm pack` does not establish that a version is available from npm.
|
|
8
|
+
Actual releases and verification limits belong in the
|
|
9
|
+
[validation records](../validation/README.md).
|
|
10
|
+
|
|
11
|
+
## 1. Release identity and prerequisites
|
|
12
|
+
|
|
13
|
+
One release contains six packages at the same exact version, published in
|
|
14
|
+
the following order:
|
|
15
|
+
|
|
16
|
+
| Order | Package | Contents |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
| 1–4 | `@ckanner/flywheel-{darwin,linux}-{arm64,amd64}` | Four platform-specific Go binaries |
|
|
19
|
+
| 5 | `@ckanner/dsh-plugin-flywheel` | Desktop plugin and workers |
|
|
20
|
+
| 6 | `@ckanner/flywheel` | User-facing CLI, installer, and documentation |
|
|
21
|
+
|
|
22
|
+
The meta package pins all five dependencies. Every Flywheel package declares
|
|
23
|
+
MIT and includes its `LICENSE`; the plugin retains third-party notices.
|
|
24
|
+
The Codex Pro dependency is pinned to 0.9.0 and bundled from the
|
|
25
|
+
[recorded source candidate](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/vendor/README.md). Claude Code
|
|
26
|
+
Pro 0.4.0 remains an optional peer, not a seventh Flywheel release package.
|
|
27
|
+
|
|
28
|
+
Use Git, Go **1.27**, Node **24.22.1**, and npm **12.2.1**, matching the
|
|
29
|
+
repository workflows. The end-user Node requirement is lower; the release
|
|
30
|
+
toolchain is deliberately fixed. The reviewed source must be clean, all six
|
|
31
|
+
versions must agree, and the exact `vX.Y.Z` tag must point to HEAD. Never move
|
|
32
|
+
an existing release tag or replace already-published package bytes.
|
|
33
|
+
|
|
34
|
+
`candidate.json` records the source commit, tree, snapshot SHA-256, and each
|
|
35
|
+
tarball's SHA-512 integrity. Build once, then verify, test, and publish those
|
|
36
|
+
same tarballs. A candidate with `source.dirty: true` is for development only.
|
|
37
|
+
|
|
38
|
+
## 2. Validate the release source
|
|
39
|
+
|
|
40
|
+
Run the checks required by the [contribution guide](contributing.md) and
|
|
41
|
+
the current [CI workflow](https://github.com/ckanner/flywheel/blob/main/.github/workflows/ci.yml):
|
|
42
|
+
|
|
43
|
+
| Area | Required evidence |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| Go | `make quality-gate` and the workflow's core-package race checks |
|
|
46
|
+
| DSH plugin | Locked dependency installation, build, and behavior tests |
|
|
47
|
+
| Backend boundary | DSH, Codex Pro, and Claude Code Pro offline bridge tests |
|
|
48
|
+
| npm | `npm test` and real installation of the six-package candidate |
|
|
49
|
+
| Native CLI | Build, version/help, and JSON configuration checks |
|
|
50
|
+
| Session policies | `npm run test:sessions` with the built native binary |
|
|
51
|
+
| Documentation | Links, language parity, packaged guides, and licenses |
|
|
52
|
+
|
|
53
|
+
Prepare the exact optional Claude tarball using the workflow's pinned source
|
|
54
|
+
SHA and SHA-256 check. For plugin/bridge tests, the workflow temporarily
|
|
55
|
+
installs it as a development dependency and restores the source manifests.
|
|
56
|
+
Export `FLYWHEEL_CLAUDE_CODE_PRO_TARBALL` as the absolute path to that verified
|
|
57
|
+
tarball before running candidate installation tests.
|
|
58
|
+
An absent optional peer does not count as a passed Claude backend check.
|
|
59
|
+
|
|
60
|
+
These checks use isolated profiles and offline model fixtures. They do not
|
|
61
|
+
establish live account readiness, model quality, or physical desktop layout.
|
|
62
|
+
Record the actual platforms tested; cross-compilation does not establish
|
|
63
|
+
runtime verification on the target platform.
|
|
64
|
+
|
|
65
|
+
## 3. Build one candidate
|
|
66
|
+
|
|
67
|
+
From the clean checkout of the reviewed release tag, run each command and
|
|
68
|
+
stop on failure:
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
FLYWHEEL_RELEASE_VERSION=$(node -p "require('./package.json').version")
|
|
72
|
+
FLYWHEEL_RELEASE_SHA=$(git rev-parse HEAD)
|
|
73
|
+
node scripts/release-preflight.js --version "$FLYWHEEL_RELEASE_VERSION" --tag "v$FLYWHEEL_RELEASE_VERSION" --json
|
|
74
|
+
npm run build:npm
|
|
75
|
+
node scripts/release-publish.js verify-candidate --directory dist-npm --source-sha "$FLYWHEEL_RELEASE_SHA"
|
|
76
|
+
FLYWHEEL_NPM_PACKAGES_DIR=dist-npm npm run test:install
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Set the Claude tarball environment variable described above before the final
|
|
80
|
+
command. The build installs locked plugin dependencies inside an isolated
|
|
81
|
+
source snapshot, with lifecycle scripts disabled, then builds the workers and
|
|
82
|
+
four Go binaries. It does not reuse the caller's `node_modules` or `dist`.
|
|
83
|
+
Root-level `npm install` is not required.
|
|
84
|
+
|
|
85
|
+
Preserve `dist-npm/`, its `candidate.json`, source identity, toolchain versions,
|
|
86
|
+
and validation results. Verify all six packed MIT licenses and the root and
|
|
87
|
+
plugin language editions. If source changes before any upload, prepare a new
|
|
88
|
+
candidate from the new reviewed source. After any upload, retain the original
|
|
89
|
+
candidate and follow the recovery rules below.
|
|
90
|
+
|
|
91
|
+
## 4. GitHub Actions publication
|
|
92
|
+
|
|
93
|
+
Pushing the reviewed tag triggers [publish.yml](https://github.com/ckanner/flywheel/blob/main/.github/workflows/publish.yml).
|
|
94
|
+
An existing tag can also be supplied to its manual dispatch. Linux and macOS
|
|
95
|
+
verify the same candidate artifact; the publish job refreshes remote refs and
|
|
96
|
+
requires the tag to still identify the checked source.
|
|
97
|
+
|
|
98
|
+
GitHub access and npm publication rights are separate. Configure trusted
|
|
99
|
+
publishing for each of the six packages with owner `ckanner`, repository
|
|
100
|
+
`flywheel`, workflow `publish.yml`, and no environment unless the workflow is
|
|
101
|
+
changed to use one. Both **npm publish** and **npm dist-tag** permissions are
|
|
102
|
+
needed. The workflow also supports an authorized `NPM_TOKEN` fallback.
|
|
103
|
+
|
|
104
|
+
New packages require npm's initial package-creation authorization before
|
|
105
|
+
their trusted publisher can be configured. Use the normal authorized npm
|
|
106
|
+
flow; do not upload different placeholder bytes under the release version.
|
|
107
|
+
See the official [trusted publisher](https://docs.npmjs.com/trusted-publishers/)
|
|
108
|
+
and [dist-tag](https://docs.npmjs.com/adding-dist-tags-to-packages/) documentation
|
|
109
|
+
for account setup. `npm whoami` identifies an account, not its publishing rights.
|
|
110
|
+
|
|
111
|
+
Publication requires explicit repository visibility: `public` requires
|
|
112
|
+
provenance; `private` disables unsupported private-source provenance. Choose
|
|
113
|
+
the repository's actual visibility. Publishing a package does not change
|
|
114
|
+
repository visibility, and OIDC authentication is separate from provenance.
|
|
115
|
+
|
|
116
|
+
## 5. Publish locally from private source
|
|
117
|
+
|
|
118
|
+
A maintainer can build from a normal Git checkout. With the current release
|
|
119
|
+
policy, new uploads from a public repository must use section 4: the publisher
|
|
120
|
+
requires provenance, which npm generates only in a supported cloud CI/CD
|
|
121
|
+
environment, not an ordinary local browser-login session. See
|
|
122
|
+
[npm provenance requirements](https://docs.npmjs.com/generating-provenance-statements/).
|
|
123
|
+
The local upload example below applies only when the source repository is
|
|
124
|
+
actually private. Do not label a public repository private to bypass this
|
|
125
|
+
requirement. No downloaded archive is required. Complete source review and
|
|
126
|
+
the checks above first. If Actions cannot run, record the maintainer's
|
|
127
|
+
authorization, actual local results, and checks that were not performed;
|
|
128
|
+
do not report unavailable CI as passing.
|
|
129
|
+
|
|
130
|
+
From the same clean tagged source and its original candidate:
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
npm login --auth-type=web --scope=@ckanner --registry=https://registry.npmjs.org/
|
|
134
|
+
npm run release:local -- --repository-visibility private
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Complete the normal browser/2FA prompts in the terminal. The publisher
|
|
138
|
+
requires a TTY; do not pipe its output through `tee`.
|
|
139
|
+
|
|
140
|
+
`release:local` performs these steps:
|
|
141
|
+
|
|
142
|
+
1. Recheck clean source, exact local and remote tag, tree, snapshot, candidate
|
|
143
|
+
manifest, and package integrity.
|
|
144
|
+
2. Run candidate installation, then verify the source and candidate again.
|
|
145
|
+
3. Upload platform packages, plugin, and meta under `candidate-X-Y-Z`.
|
|
146
|
+
4. Install the exact version from the official npm registry.
|
|
147
|
+
5. Recheck source and remote tag, promote `latest` in the same order, and
|
|
148
|
+
verify all six tags and integrities.
|
|
149
|
+
|
|
150
|
+
The command uses the repository's existing release checks. Only npm publish
|
|
151
|
+
and dist-tag writes inherit terminal I/O; registry queries retain strict JSON
|
|
152
|
+
parsing and bounded timeouts. The command does not log in, create or move
|
|
153
|
+
tags, or change account security settings.
|
|
154
|
+
|
|
155
|
+
For a reviewed older release that needs newer tooling, `--source-directory`
|
|
156
|
+
can point at its exact tagged worktree and `--directory` at its original
|
|
157
|
+
candidate. The source defaults to the tooling checkout; the candidate
|
|
158
|
+
directory defaults to `dist-npm/` inside the selected source directory. Explicit
|
|
159
|
+
relative paths resolve from the invocation directory. Do not copy newer
|
|
160
|
+
tooling into old release source or rebuild an already-published version.
|
|
161
|
+
|
|
162
|
+
## 6. Visibility, promotion, and retry behavior
|
|
163
|
+
|
|
164
|
+
Packages first use the candidate tag. All exact versions and integrities must
|
|
165
|
+
be visible and registry installation must succeed before `latest` moves.
|
|
166
|
+
Platform packages are promoted first, the plugin next, and the user-facing
|
|
167
|
+
meta package last. npm has no atomic six-package tag transaction.
|
|
168
|
+
|
|
169
|
+
Only a structured E404 means a queried version is absent. Authentication,
|
|
170
|
+
transport, cancellation, malformed output, or missing integrity fails the
|
|
171
|
+
operation. Registry queries accept the supported scalar and single-element
|
|
172
|
+
array response shapes; multiple results are rejected.
|
|
173
|
+
|
|
174
|
+
After upload, visibility checks have a 180-second budget per package, with
|
|
175
|
+
E404 backoff from 2 seconds to at most 15 seconds. Each read is bounded by
|
|
176
|
+
30 seconds and the remaining budget. Promotion verification uses the same
|
|
177
|
+
bounded approach for `latest` and integrity. It repeats reads, not writes,
|
|
178
|
+
and refuses a newer `latest`, conflicting integrity, or invalid version.
|
|
179
|
+
|
|
180
|
+
| Failure | Recovery |
|
|
181
|
+
| --- | --- |
|
|
182
|
+
| Authentication or browser approval | Resolve the authorized npm login; retain the candidate. |
|
|
183
|
+
| Some packages uploaded | Retry the original candidate; existing versions must match its integrity. |
|
|
184
|
+
| Registry visibility timeout | Preserve the artifact and retry after the external issue is resolved. |
|
|
185
|
+
| Installation or tag promotion failed | Resume with the same candidate; do not downgrade a newer `latest`. |
|
|
186
|
+
| Source must change after upload | Use a new uniform version and a new reviewed tag. |
|
|
187
|
+
| Original candidate is missing | Recover it; do not assume a rebuild has identical bytes. |
|
|
188
|
+
|
|
189
|
+
With Actions, rerun failed jobs using the original artifact. Locally, rerun
|
|
190
|
+
the final `release:local` command against the preserved source and candidate.
|
|
191
|
+
|
|
192
|
+
## 7. Record completion
|
|
193
|
+
|
|
194
|
+
Publication is complete only after all six exact versions and integrities,
|
|
195
|
+
registry installation, and final `latest` checks have passed. Record those
|
|
196
|
+
results separately from source review, local tests, CI, and desktop acceptance.
|
|
197
|
+
For an additional exact-version installation check:
|
|
198
|
+
|
|
199
|
+
```sh
|
|
200
|
+
FLYWHEEL_NPM_VERSION=X.Y.Z npm run test:registry
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Replace `X.Y.Z` with the released version. Record source SHA, candidate
|
|
204
|
+
identity, actual platforms, failures/retries, and remaining limits in a dated
|
|
205
|
+
validation record and release notes. See the
|
|
206
|
+
[0.30.2 release record](../validation/2026-11-11-release-0.30.2.md) for a
|
|
207
|
+
historical example; it is evidence for that release, not a live registry status.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Session quality policy and paired evaluation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[Documentation](../README.md) · English · [简体中文](../zh-CN/session-evaluation.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Flywheel supports bounded context rebuilding based on confirmed facts and paired experiments using three history policies on the same tasks. Rebuild thresholds default to disabled. The evaluator preserves original conditions and results, keeps missing usage unknown, and assumes no quality, cache, or speed benefit.
|
|
6
|
+
|
|
7
|
+
See [configuration](configuration.md) for the policy and [recovery](session-recovery.md) for lifecycle and ledger semantics. Implementation entry points are the [quality policy](https://github.com/ckanner/flywheel/blob/main/internal/machine/session_quality.go), [evaluator](https://github.com/ckanner/flywheel/blob/main/scripts/evaluate-sessions.js), and [corpus preparer](https://github.com/ckanner/flywheel/blob/main/scripts/prepare-session-evaluation.js).
|
|
6
8
|
|
|
7
9
|
## Bounded rebuilding
|
|
8
10
|
|
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
# Interrupted calls and context quality
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[Documentation](../README.md) · English · [简体中文](../zh-CN/session-recovery.md)
|
|
4
|
+
|
|
5
|
+
Flywheel separates reuse of a role’s conversation history from recovery of an
|
|
6
|
+
interrupted invocation. Fresh and scoped histories both retain invocation safety
|
|
7
|
+
checks. Durable public-journal recovery requires **Codex Pro 0.9.0** or
|
|
8
|
+
**Claude Code Pro 0.4.0**; DSH and Kimi retain their own supported recovery paths.
|
|
9
|
+
|
|
10
|
+
## Resume an existing task
|
|
11
|
+
|
|
12
|
+
Use the original task ledger and integration directory. Read its status, then
|
|
13
|
+
request continuation through the normal engine entry point:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
flywheel control status --cwd /repo --task-dir /repo/docs/my-task
|
|
17
|
+
flywheel control start --cwd /repo --task-dir /repo/docs/my-task
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The engine reconciles earlier calls before making another model request. A
|
|
21
|
+
`pending` or `unknown` outcome can keep the task blocked; preserve its journals
|
|
22
|
+
and diagnostics rather than deleting state or selecting a fresh session to
|
|
23
|
+
force progress. A status response describes current facts, not permission to
|
|
24
|
+
replay an unresolved call.
|
|
4
25
|
|
|
5
26
|
## Ownership
|
|
6
27
|
|
|
@@ -44,6 +65,10 @@ At `cleanup-confirmed`, before acknowledging, Go captures the post-call candidat
|
|
|
44
65
|
|
|
45
66
|
A durable receipt without the Go candidate checkpoint may reconcile trustworthy usage while leaving business execution blocked. A proven pre-dispatch rejection may be treated as unexecuted only with confirmed cleanup and an unchanged original candidate and guard. Review/Judge contract and candidate checks remain mandatory.
|
|
46
67
|
|
|
68
|
+
### Shared-checkout execution
|
|
69
|
+
|
|
70
|
+
For shared-checkout execution, an Execute receipt fingerprints its declared write scope and binds that scope into the session identity. Independent peer changes do not discard a known invocation; changes within its own scope still reject stale receipts. L1, independent Review and collective delivery validate the entire combined candidate. Scoped receipts neither prove batch completion nor bypass unknown dispatch, outcome or cleanup.
|
|
71
|
+
|
|
47
72
|
## Accounting and budgets
|
|
48
73
|
|
|
49
74
|
Consumed invocations do not create another model request or call count. If an unknown invocation later yields trusted usage, Go appends an auditable correction tied to the same call, provider, original day, and lifetime totals. Recovery does not recreate an expired daily bucket.
|
|
@@ -54,7 +79,7 @@ Unknown is not zero. Rebuilds, role overrides, new workers, and Quick-to-Full tr
|
|
|
54
79
|
|
|
55
80
|
## Bounded context rebuilds
|
|
56
81
|
|
|
57
|
-
`sessions.roles` can override fresh/scoped independently for Plan, Execute, Review, and
|
|
82
|
+
`sessions.roles` can override fresh/scoped independently for Plan, Execute, Review, Judge, and judge-panel. Other roles inherit the global mode. See [session configuration](configuration.md#session-policy-history-reuse-and-invocation-safety).
|
|
58
83
|
|
|
59
84
|
Optional `sessions.quality` supports:
|
|
60
85
|
|
|
@@ -68,16 +93,34 @@ All thresholds default to disabled. They may rebuild only after the previous cal
|
|
|
68
93
|
|
|
69
94
|
A rebuild records its reason and generation and hands over current contracts, workspace, valid reports, verification, and structured feedback. It never imports another role's private transcript or issues an unmetered model-compression call. A returning Reviewer must still inspect the entire current candidate.
|
|
70
95
|
|
|
71
|
-
|
|
96
|
+
### Verified incremental inputs
|
|
97
|
+
|
|
98
|
+
Explicit `sessions.context:"verified-incremental"` permits Execute to reuse a
|
|
99
|
+
confirmed same-role stable contract after Go verifies that the consumed receipt
|
|
100
|
+
proves `dispatched` and `completed`, together with the prompt version, current
|
|
101
|
+
contract and readable context/cache file digests. A safe admission rejection or
|
|
102
|
+
failed/cancelled turn may preserve the old thread, but cannot prove delivery of
|
|
103
|
+
that turn's newly prepared authority; the next call resends full input. New
|
|
104
|
+
input carries feedback, candidate identities, attempt and references. Changed or
|
|
105
|
+
unavailable authority, legacy missing checkpoints and invalid context receipts
|
|
106
|
+
select full input. The decision and reason are saved on the role record. Review
|
|
107
|
+
and Judge keep full current inputs and never inherit Executor private history.
|
|
108
|
+
|
|
109
|
+
An opt-in [execution policy](configuration.md#bounded-execution-policy-opt-in)
|
|
110
|
+
can select another complete allowed binding. Every switch starts a new history
|
|
111
|
+
generation, including effort-only changes. Explicit session mode is also part
|
|
112
|
+
of the binding. Unknown/pending invocations reconcile first; fresh context cannot
|
|
113
|
+
authorize replaying uncertain effects. Switch records separate quality upgrades
|
|
114
|
+
from channel fallback and preserve the original task and packet budgets.
|
|
115
|
+
|
|
116
|
+
## Paired evaluation
|
|
72
117
|
|
|
73
118
|
The repository tools pin source and use an independent frozen oracle to compare fresh, Execute-only scoped, and role-scoped policies. The corpus covers first-pass success, L1 repair, Review return, long context, stop/resume, and configuration changes, with repeated trials and rotated strategy order. Reports retain quality, omissions, regressions, repair rounds, repeated findings, elapsed time, known/unknown tokens and cache use, rebuild reasons, and recovery failures. Actual state evidence determines whether a scenario occurred.
|
|
74
119
|
|
|
75
|
-
The offline native fixture exercises the real Go engine, worker v3, and public plugin API. It validates the evaluator and safety behavior, not model quality, cache rates, or savings. Real paired results require an available native CLI, account, permissions, and model. Defaults remain unchanged until that evidence exists. See the [
|
|
120
|
+
The offline native fixture exercises the real Go engine, worker v3, and public plugin API. It validates the evaluator and safety behavior, not model quality, cache rates, or savings. Real paired results require an available native CLI, account, permissions, and model. Defaults remain unchanged until that evidence exists. See the [paired evaluation guide](session-evaluation.md) for commands and report interpretation.
|
|
76
121
|
|
|
77
122
|
## Retention and operation
|
|
78
123
|
|
|
79
124
|
Recovery journals have private permissions, exclusive creation, identity/digest checks, and atomic persistence. Existing directories never authorize redispatch. They are task audit data and may contain model output and diagnostics; keep their access and backups with the task. Do not copy credentials or delete uncertain evidence during upgrades.
|
|
80
125
|
|
|
81
126
|
There is currently no automatic journal-retention timer. Archive evidence through the project's task lifecycle after completion or explicit resolution of an unknown result. Deleting a journal is not a recovery procedure. `control status` and doctor are observation surfaces; models and skills never write `state.json`. Resume through the normal Go entry point from the original task directory so the engine can reconcile before making a new call.
|
|
82
|
-
|
|
83
|
-
For shared-checkout execution, an Execute receipt fingerprints its declared write scope and binds that scope into the session identity. Independent peer changes do not discard a known invocation; changes within its own scope still reject stale receipts. L1, independent Review and collective delivery validate the entire combined candidate. Scoped receipts neither prove batch completion nor bypass unknown dispatch, outcome or cleanup.
|