Development record
In a shallow clone, gitutil.RootCommit (rev-list -n 1 --max-parents=0 HEAD) returns the graft commit, not the repository's root, and every machine-scoped store keyed on it files under that wrong key with no warning: the history ingest (internal/core/history/ingest.go:86), labs (internal/core/lab/lab.go:172), implement runs and loop state (internal/core/implement/load.go:357, internal/core/implement/loop/loop.go:454 and siblings), the report inbox key (internal/core/report/inbox.go:106), the lifeboat probe (internal/core/lifeboat/probe.go:211) and ahoy's managed-repository index (internal/core/ahoy/store.go:68, managed.go:54). A later full clone of the same repository reads a different folder, so the records look lost. CI checks out full history (fetch-depth: 0), so the gates are not affected. Found by review of the ideate private/public fix (iss-2610090740139804), which now refuses a shallow checkout at its own front door.
In a shallow clone, gitutil.RootCommit (rev-list -n 1 --max-parents=0 HEAD) returns the graft commit, not the repository's root, and every machine-scoped store keyed on it files under that wrong key with no warning: the history ingest (internal/core/history/ingest.go:86), labs (internal/core/lab/lab.go:172), implement runs and loop state (internal/core/implement/load.go:357, internal/core/implement/loop/loop.go:454 and siblings), the report inbox key (internal/core/report/inbox.go:106), the lifeboat probe (internal/core/lifeboat/probe.go:211) and ahoy's managed-repository index (internal/core/ahoy/store.go:68, managed.go:54). A later full clone of the same repository reads a different folder, so the records look lost. CI checks out full history (fetch-depth: 0), so the gates are not affected. Found by review of the ideate private/public fix (iss-2610090740139804), which now refuses a shallow checkout at its own front door.
The same lookup is also ambiguous in a full clone whose history has more than one root commit (an unrelated history merged in) or carries local replace refs or grafts: rev-list -n 1 --max-parents=0 HEAD picks one root by commit order, so two checkouts of one repository can key a store differently. A shallow-aware lookup should refuse those shapes too rather than pick one (found by the security review of the same fix).
Frontmatter
| id | iss-2610140819442690 |
|---|---|
| type | issue |
| lifecycle | open |
| severity | minor |
.abcd/work/issues/open/iss-2610140819442690-in-a-shallow-clone-gitutil-rootcommit.md
open on GitHub ↗ · commit history ↗
mentions1
- iss-2610090740139804abcd ideate record writes every verdict straight into the repository: a research note under .abcd/development/research/notes/ and a pointer line in .abcd/work/DECISIONS.md, both committed and public once pushed. The product thinker treats every idea put through ideate as secret: an idea and the sources it came from are kept private first and enter the repository only when the person decides it should.