10 · sync-modified
What this scenario proves
archon sync correctly detects drift when a canonical file has been hand-edited, and reports it precisely (which file, expected vs actual sha256). This is the failure-mode counterpart of scenario 09 sync-clean.
Two things must both be true:
- The report flags the modified file as drifted.
- The modified file is not auto-corrected — sync stays read-only. The user must run
archon update(or revert the file manually) to resolve the drift.
Test environment
| Fixture | output of scenario 01 + a deliberate hand-edit |
| IDE | Cursor |
| Manifest version under test | v0.1.0 |
| OS | same as scenario 01 |
Pre-conditions
- Scenario 01 ✅.
git statusclean before injecting the edit.
Steps
text
1. Inject a deliberate hand-edit into a canonical file. Pick something
short and unmistakable, e.g.:
echo "" >> .cursor/commands/archon.md
echo "<!-- DRIFT INJECTED FOR TEST 10 -->" >> .cursor/commands/archon.md
2. Confirm the file's sha256 has changed:
sha256sum .cursor/commands/archon.md
3. In Cursor, paste exactly:
hi archon, are you healthy?
4. Read the report — should call out
.cursor/commands/archon.md FAIL expected <sha-A> got <sha-B>
5. Confirm sync did not modify any file:
git status
must show ONLY the file you injected (modified), nothing extra.
6. Repair drift via update:
hi archon, update yourself
confirm the planned change includes restoring .cursor/commands/archon.md
and accept.
7. Re-run sync (step 3) — should now report N/N OK again.Expected outcome
| Check | Expected |
|---|---|
| Sync (step 3) prints the modified file with FAIL + sha mismatch | yes |
| Sync exits with non-zero status (or otherwise signals "drift detected" — match protocol page) | yes |
| Sync does not modify any file (step 5) | yes |
| Update (step 6) restores the canonical content | yes |
| Re-sync (step 7) | N/N OK |
.archon/drift.md row count | unchanged throughout (sync/update of canonical files is not a drift event in the runtime-ledger sense) |
Demo recordings
Recording coming soon
sync-modified.mp4IDE chat-panel walkthroughdocs/public/videos/sync-modified.mp4 once recorded. See videos/README for upload conventions. $ archon doctor .
[L1 Structural] OK
[L2 Contract] OK
[L3 Hints] OK
✔ Recording coming soon — placeholderdocs/public/asciinema/sync-modified.cast embedded via the asciinema-player web component. See asciinema/README for the recording command. Run records
The table below is rendered live from JSON written by the sandbox runner (scripts/sandbox-run.mjs) under docs/testing/sandbox/runs/sync-modified/. To add a new row, run
bash
node scripts/sandbox-run.mjs --only=sync-modified| Started (UTC) | Manifest | Runner | Result | Duration | Notes | Record |
|---|---|---|---|---|---|---|
2026-06-08 08:17:13 UTC | v0.1.0 | cli | ✅ passing | 359 ms | — | JSON |
2026-06-07 07:10:18 UTC | v0.1.0 | cli | ✅ passing | 454 ms | — | JSON |
2026-06-06 06:34:42 UTC | v0.1.0 | cli | ✅ passing | 354 ms | — | JSON |
2026-06-05 07:14:08 UTC | v0.1.0 | cli | ✅ passing | 340 ms | — | JSON |
2026-06-04 07:56:45 UTC | v0.1.0 | cli | ✅ passing | 376 ms | — | JSON |
2026-06-03 08:24:19 UTC | v0.1.0 | cli | ✅ passing | 368 ms | — | JSON |
2026-06-02 08:00:53 UTC | v0.1.0 | cli | ✅ passing | 365 ms | — | JSON |
2026-06-01 08:40:47 UTC | v0.1.0 | cli | ✅ passing | 371 ms | — | JSON |
2026-05-31 07:02:25 UTC | v0.1.0 | cli | ✅ passing | 354 ms | — | JSON |
2026-05-30 06:27:55 UTC | v0.1.0 | cli | ✅ passing | 345 ms | — | JSON |
2026-05-29 06:59:41 UTC | v0.1.0 | cli | ✅ passing | 350 ms | — | JSON |
2026-05-28 06:59:35 UTC | v0.1.0 | cli | ✅ passing | 347 ms | — | JSON |
2026-05-27 07:09:43 UTC | v0.1.0 | cli | ✅ passing | 368 ms | — | JSON |
2026-05-26 06:52:10 UTC | v0.1.0 | cli | ✅ passing | 355 ms | — | JSON |
2026-05-25 07:20:23 UTC | v0.1.0 | cli | ✅ passing | 354 ms | — | JSON |
2026-05-24 06:41:54 UTC | v0.1.0 | cli | ✅ passing | 357 ms | — | JSON |
2026-05-23 06:16:51 UTC | v0.1.0 | cli | ✅ passing | 349 ms | — | JSON |
2026-05-22 06:54:19 UTC | v0.1.0 | cli | ✅ passing | 355 ms | — | JSON |
2026-05-21 06:58:05 UTC | v0.1.0 | cli | ✅ passing | 355 ms | — | JSON |
2026-05-20 06:53:39 UTC | v0.1.0 | cli | ✅ passing | 353 ms | — | JSON |
2026-05-19 06:53:19 UTC | v0.1.0 | cli | ✅ passing | 366 ms | — | JSON |
2026-05-18 07:01:48 UTC | v0.1.0 | cli | ✅ passing | 370 ms | — | JSON |
2026-05-17 06:27:38 UTC | v0.1.0 | cli | ✅ passing | 357 ms | — | JSON |
2026-05-16 06:04:42 UTC | v0.1.0 | cli | ✅ passing | 344 ms | — | JSON |
2026-05-15 06:38:01 UTC | v0.1.0 | cli | ✅ passing | 358 ms | — | JSON |
2026-05-14 06:28:58 UTC | v0.1.0 | cli | ✅ passing | 355 ms | — | JSON |
2026-05-13 06:30:26 UTC | v0.1.0 | cli | ✅ passing | 315 ms | — | JSON |
2026-05-12 06:19:02 UTC | v0.1.0 | cli | ✅ passing | 363 ms | — | JSON |
2026-05-11 06:45:36 UTC | v0.1.0 | cli | ✅ passing | 322 ms | — | JSON |
2026-05-10 06:16:46 UTC | v0.1.0 | cli | ✅ passing | 375 ms | — | JSON |
2026-05-09 05:52:41 UTC | v0.1.0 | cli | ✅ passing | 367 ms | — | JSON |
2026-05-08 05:33:37 UTC | v0.1.0 | cli | ✅ passing | 364 ms | — | JSON |
2026-05-07 11:01:04 UTC | v0.1.0 | cli | ✅ passing | 360 ms | — | JSON |
2026-05-07 09:54:55 UTC | v0.1.0 | cli | ✅ passing | 359 ms | — | JSON |
2026-05-07 09:45:14 UTC | v0.1.0 | cli | ✅ passing | 476 ms | — | JSON |
2026-05-07 06:15:46 UTC | v0.1.0 | cli | ✅ passing | 352 ms | — | JSON |
2026-05-06 13:05:54 UTC | v0.1.0 | cli | ✅ passing | 399 ms | — | JSON |
2026-05-06 10:24:36 UTC | v0.1.0 | cli | ✅ passing | 386 ms | — | JSON |
2026-05-06 06:10:25 UTC | v0.1.0 | cli | ✅ passing | 416 ms | — | JSON |
2026-05-06 00:55:44 UTC | v0.1.0 | cli | ✅ passing | 362 ms | — | JSON |
2026-05-06 00:40:10 UTC | v0.1.0 | cli | ✅ passing | 386 ms | — | JSON |
2026-05-05 15:00:35 UTC | v0.1.0 | cli | ✅ passing | 343 ms | — | JSON |
2026-05-05 14:55:19 UTC | v0.1.0 | cli | ✅ passing | 400 ms | — | JSON |
2026-05-05 14:22:54 UTC | v0.1.0 | cli | ✅ passing | 366 ms | — | JSON |
2026-05-05 14:04:54 UTC | v0.1.0 | cli | ✅ passing | 403 ms | — | JSON |
2026-05-05 14:00:01 UTC | v0.1.0 | cli | ✅ passing | 393 ms | — | JSON |
2026-05-05 13:55:05 UTC | v0.1.0 | cli | ❌ failing | 439 ms | prereq failed: tamper soul.md exit 1 | JSON |
Known limitations
- This scenario only injects drift on a binding-root file (
.cursor/commands/archon.md). A more complete matrix would also inject drift in.archon/soul.md,.archon/manifest.md, etc., to prove the report covers the core directory equally. Add as follow-up scenarios when prioritised. - Does not test the case where a runtime ledger is hand-edited (
.archon/drift.md). Those files are project-owned and must not be reported as drift bysync— that is a separate negative test (sync-ignores-runtime-ledgers).
Cross-references
- Protocol page:
/setup/syncand/setup/update - Pre-requisite: 01 install-cursor-node
- Sibling: 09 sync-clean — same flow, no drift injected
json
{
"runnable": "cli",
"fixture": "fixtures/sandbox-node-ts",
"ide_platform": "cursor",
"prerequisites": [
{
"name": "archon install",
"cli": "install",
"flags": [
"--with=cli"
]
},
{
"name": "tamper soul.md",
"append_to_file": {
"path": ".archon/soul.md",
"content": "\n# tampered by sandbox runner\n"
}
}
],
"steps": [
{
"name": "archon sync (expected to flag drift)",
"cli": "sync",
"flags": [
"--json"
],
"allow_nonzero": true
}
],
"assertions": [
{
"file_exists": ".archon/soul.md"
},
{
"file_contains": {
"path": ".archon/soul.md",
"substr": "tampered by sandbox runner"
}
}
],
"notes": "Asserts that tampering is preserved on disk and `archon sync` runs without crashing. A future enhancement could capture the JSON drift report and assert specific drift counts."
}