Repository navigation
fix: write gitlink tree entries as commit in toMktreeFormat - #69
flyingrobots wants to merge 5 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
GitTree.toMktreeFormat() took the type from isTree() alone, so a mode-160000 gitlink was written as blob and git mktree refused it. The type now comes from GitTreeEntry.type(), which maps the mode through GitFileMode.getObjectType(). Closes #46
|
Pushed
|
Footprint5 files, +124/-4 · Structural, as
Compositionpie showData
title Changed lines by file kind
"source" : 8
"test" : 116
"docs" : 4
Files (5)docs
source
test
Figures computed from Before merge
After mergeNo landing steps are declared: After-merge steps are read from this repository's own Blast radius+0 added / -0 removed / ~0 signature-changed exported symbols ·
Exported symbols from Call sites are footprint's own whole-word identifier scan, not graft's: every whole-word occurrence of the name in the tracked, non-binary files of the working tree ( The grouping. A system is the first path segment of a call site's repository-relative path: the directory immediately under the repository root, however deep the file sits inside it. A file at the repository root has no such segment and is grouped under (unassigned), which is listed last and never dropped. Systems are ordered by name so the grouping follows the tree rather than the order the scan found the sites in. The mitigations. Every row's mitigation is derived from two reported facts about that call site and nothing else: whether it is in the very file the symbol is exported from, and what classify() calls that file. A call site in the symbol's own declaring file, or in a test file, is "None needed"; any other call site states the system it is in, or that it is outside every known system. No mitigation is a judgement about importance, risk or coverage, and none is advice: footprint reports and does not judge (AGENTS.md). Every changed source file was in a language footprint recognises graft's grammars can parse. Open pull requests1 of 1 other open pull request touches a file this change touches.
Proposed merge order (2 waves)Wave 1 — #69 Wave 2 — #83, after wave 1
Pull requests from Changelog
|
Automated review, round 1 (head b287253)No findings. I found no P0–P3 defect introduced by The change at src/domain/entities/GitTree.js:112 correctly uses The constructor already normalizes plain-object entries into The tests provide meaningful coverage:
Validation ran in disposable Docker copies with the repository mounted read-only:
The CHANGELOG accurately describes the fix. I found no README or documentation claim contradicted by the change. This was focused validation, not a full-suite run. Repository files remain unchanged, and the worktree is clean. 🎬 plumbing review 🟢 100% (1/1) [plumbing:🟢] VERDICT: APPROVE |
Baker Street review (head b287253): CHANGES_REQUIREDThe #46 fix itself was found correct: RED on base and GREEN at head for all four new tests (Node, Bun), Deno subset green, lint clean, CHANGELOG accurate. The blocking finding is pre-existing and outside #46's scope:
#46 lists "Other changes to Informational follow-ups (not blocking): F-2, the plumbing under test in |
|
Pushed 8a208c7 and da7deb9, following the coordinator's decision. F-1 is now tracked separately in #84, which merges first, and stays out of this PR.
|
Summary
GitTree.toMktreeFormat()takes each entry's type from its mode throughGitTreeEntry.type()(which usesGitFileMode.getObjectType()), so a mode-160000gitlink is written as160000 commit <id>\t<path>instead ofblob. Before this,GitPersistenceService.writeTree()could not write any tree holding a submodule:git mktreerefused the line withobject type (blob) doesn't match mode type (commit).Tests
160000 commit <id>\tsub\n; a tree with every allowed mode carriestree,blob,blob,blob,commit.git mktree, SHA-1 and SHA-256 bare repositories):writeTree()of a blob plus a gitlink whose commit is not in the object database, read back withgit ls-tree.Closes #46