Skip to content

fix(demo): sharded-layout object check in run_protect_demo.sh - #48

Merged
tonibergholm merged 3 commits into
mainfrom
fix-protect-demo-object-check
Jul 11, 2026
Merged

tonibergholm merged 3 commits into
mainfrom
fix-protect-demo-object-check

Conversation

@tonibergholm

Copy link
Copy Markdown
Member

Closes #44.

Problem

demo/run_protect_demo.sh failed on every run with FAIL: clone dropped object <aa>: its clone object-presence check predates P8's sharded loose-object layout (.sc/objects/<aa>/<rest>), so its one-level glob saw shard directories and [ -f ] was always false.

Fix

One hunk: replace the flat per-object loop with the sorted find .sc/objects -type f diff between origin and clone — the exact idiom already used by run_http_remote_demo.sh:107 and run_streaming_demo.sh:98. Deliberately a stronger assertion than the original (bidirectional store equality, not just A ⊆ B), and diff prints the differing paths before fail fires.

Verification

  • Failure reproduced at branch base, then demo run twice post-fix: all four ✔ lines + RESULT: line, exit 0, zero residue.
  • Full workspace cargo test green (529+ tests, 0 failures).
  • Design spec and implementation plan included under docs/superpowers/.

Note (from final review, non-blocking): CLAUDE.md's Commands block doesn't list this demo — pre-existing gap, candidate for a follow-up docs commit now that the P7 proof passes again.

@tonibergholm
tonibergholm merged commit 05f933c into main Jul 11, 2026
5 checks passed
@tonibergholm
tonibergholm deleted the fix-protect-demo-object-check branch July 11, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run_protect_demo.sh: stale pre-P8 object-presence check always fails

1 participant