-
Notifications
You must be signed in to change notification settings - Fork 2
canon: codify preflight as a hard, enforced takeoff gate #267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
git-repo-auth
wants to merge
5
commits into
main
Choose a base branch
from
canon/preflight-checklist-takeoff-gate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d8302c1
canon: codify preflight as a hard, enforced takeoff gate
klappy 480b0ec
ledger: self-record the preflight-takeoff-gate flight (recording-as-l…
klappy 0bfd98d
Fix preflight unreadable opt-in handling
cursoragent 8b7f102
Fix preflight declaration validation
cursoragent 0f6b79a
Trigger canon quality for journal artifacts
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # DISPATCH.md — Dispatch Protocol for Flights in This Project | ||
|
|
||
| > Every dispatched flight — an assistant-orchestrated sub-agent, an autonomous-trigger runtime, or a fresh session boarding cold — passes the same hard preflight gate a maintainer session does. Dispatch does not lower the bar; it is the most common place the bar gets skipped, because a dispatched flight often arrives with a partial toolset and no one watching it board. This file is the takeoff clearance for anything dispatched here. | ||
|
|
||
| See `canon/methods/dispatch-paths.md` for the two dispatch classes (assistant-orchestrated vs. autonomous-trigger) and `canon/bootstrap/model-operating-contract.md` for the binding operating contract. The authoritative rule below is `klappy://canon/constraints/preflight-checklist-takeoff-gate`. | ||
|
|
||
| --- | ||
|
|
||
| ## The takeoff gate — no dispatched flight works without passing it | ||
|
|
||
| Before ANY work, every flight runs preflight and passes all five items. Each item is green only when **observed live this flight** — never from cache, memory, or inference. | ||
|
|
||
| 1. **Clock** — `oddkit_time` succeeds and returns `server_time`. | ||
| 2. **Canon reachable** — fetch `klappy://canon/bootstrap/model-operating-contract` via oddkit and confirm it resolves. **Unreachable → ABORT.** This is the failure that grounded the fleet all week: dispatched Code flights carried zero MCP connectors, could not reach canon, and flew anyway on recall. | ||
| 3. **Tools present** — the specific connectors this task needs (GitAuth to push, Shopify for store work, the AMS wire to reach a peer, etc.) are actually available. Missing → abort, or narrow scope to what the present tools support and say so explicitly. | ||
| 4. **Tier correct** — the running model matches the task's required tier. | ||
| 5. **Boarded** — the role's boarding doc (`canon/bootstrap/boarding-pass` or `generic-boarding-pass`) and the memory-mirror are read this flight. | ||
|
|
||
| All five green → **cleared for takeoff.** | ||
|
|
||
| ## Declare the result before you work | ||
|
|
||
| A cleared flight states its preflight result at the **top of its first substantive message**: which items passed and the observed evidence for the load-bearing ones (clock value, operating-contract content hash, connectors present, tier, boarding read). A flight that reports work without a passed, declared preflight is **invalid** — the work is unverified because the conditions to verify it were never confirmed. | ||
|
|
||
| ## Abort behavior — report, do not simulate | ||
|
|
||
| Fail any item and the flight does not take off. Report the specific failure plainly — **"cannot reach `X` — aborting"** — and stop. Do not fall back to recalled governance and fly as if canon were read; do not fabricate a tool result; do not infer the date the clock did not give; do not silently narrow scope and report the full task as done. Aborting on a failed preflight is the gate working. Per axiom 3, an honest "I could not board, so I did not fly" costs far less than a confident "done" produced from memory. | ||
|
|
||
| ## Two gates bound every flight | ||
|
|
||
| - **START gate:** this preflight, declared before work. | ||
| - **END gate:** recording-as-landing — the flight records itself as it lands (`scripts/validate-preflight-declaration.py` and the CI job in `.github/workflows/canon-quality.yml` check that flight artifacts carry the declaration). | ||
|
|
||
| A flight missing either bound is incomplete: it took off without clearance, or it landed without logging. Both gates are hard. |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.