Feature/handoff folder derivation - #20
Merged
Merged
Conversation
The checkpoint tool hardcoded a docs/ handoff folder that matched no repo: both circle-docs and founders-os-docs keep handoffs in handoffs/, and neither has a docs/ directory. The wrong default plus a stray checkpoints/ folder led an agent to hand-roll the wrong artifact on 2026-07-27. - deriveHandoffFolder() reads the folder off the previous checkpoint's handoff pointer, so a project self-corrects after one good checkpoint. The handler now selects metadata, which it previously omitted, leaving the structured pointer unavailable. - nextHandoffSeq() reads -NN from today's stored pointers instead of counting checkpoint records. The old count collided when a handoff was written without a record, silently overwriting in a shared repo. - checkpointWarnings() flags a missing or non-canonical handoff_doc, and flags memory_store used for a checkpoint. Nothing previously noticed drift at the moment it happened. - Both derivations ignore non-canonical paths, so earlier drift is never taught forward. - Export the handoff helpers and rewire three describes in surfaces-logic.test.ts to import them. That file mirrored every helper inline, so its tests could pass while shipping code broke. The remaining describes still mirror; converting them is a separate pass. - Surface the resolved timezone, so a wrong filename date is diagnosable on a hosted or scheduled run where the host zone is not the user's.
7 tasks
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.
Handoff docs now land where your project actually keeps them. The checkpoint tool used to suggest a fixed docs/ folder that matched almost nobody's repo, so agents fell back to guessing from whatever folders they found lying around, and sometimes guessed wrong. It now reads the folder off your project's own previous handoff doc, so after one good checkpoint a project stays on its real convention without anyone configuring anything. The per-day sequence number is derived the same way, from the files rather than from a count that could drift.