You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Think's storage substrate is git-warp, and Think writes no Git objects of its own — commit, commit-tree, write-tree, hash-object and update-ref appear nowhere in src/. Yet Think still invokes git directly:
Site
Operation
src/git.jsensureGitRepo
git init
src/git.jssetFsmonitorDisabled
git config core.fsmonitor false
src/git.jscheckUpstream
git ls-remote
src/git.jsreadOptionalGitConfig
git config --get
src/git.jspushWarpRefs
git push refs/warp/<graph>/*
src/project-context.jsrunGitString
read-only context queries
Plus THINK_GIT_CONFIG_ARGS, which prepends -c core.fsmonitor=false to every invocation, and NON_INTERACTIVE_PUSH_ENV, which hand-manages credential-prompt suppression.
Why this is bad
Each of these is Think reasoning about Git semantics it has no business owning, and the failure mode is not theoretical. The identity defect fixed in #34 came from exactly this shape: ensureGitRepo wrote user.name/user.email into whatever directory it was handed, because that was the only channel through which the commit layer would read an identity. It silently rewrote the committer identity of any repository Think was pointed at, including a developer's own source checkout, and every commit made by hand there afterwards was misattributed.
That workaround existed because a capability was missing upstream. Reaching around the dependency rather than through it converted a missing feature into data corruption in someone else's repository.
The remaining direct calls carry the same latent risk: Think is guessing at Git behaviour that git-warp already encapsulates, and every guess is a place where Think's model and git-warp's model can drift apart silently.
Suggested direction
Establish the rule that Think uses git-warp's public API and nothing else, then close the gaps that currently prevent it:
repository creation (init) and core.fsmonitor policy
ref transport (push of refs/warp/*) and reachability checks (ls-remote)
read-only repository context queries
Where git-warp lacks a public surface for one of these, the fix belongs upstream — as with git-stunts/plumbing#13, which restores git's ability to read the operator's own configuration rather than having consumers inject identity.
Enforcement once the surface exists: see the companion COOL IDEA for a lint ratchet.
Observation
Think's storage substrate is git-warp, and Think writes no Git objects of its own —
commit,commit-tree,write-tree,hash-objectandupdate-refappear nowhere insrc/. Yet Think still invokesgitdirectly:src/git.jsensureGitRepogit initsrc/git.jssetFsmonitorDisabledgit config core.fsmonitor falsesrc/git.jscheckUpstreamgit ls-remotesrc/git.jsreadOptionalGitConfiggit config --getsrc/git.jspushWarpRefsgit push refs/warp/<graph>/*src/project-context.jsrunGitStringPlus
THINK_GIT_CONFIG_ARGS, which prepends-c core.fsmonitor=falseto every invocation, andNON_INTERACTIVE_PUSH_ENV, which hand-manages credential-prompt suppression.Why this is bad
Each of these is Think reasoning about Git semantics it has no business owning, and the failure mode is not theoretical. The identity defect fixed in #34 came from exactly this shape:
ensureGitRepowroteuser.name/user.emailinto whatever directory it was handed, because that was the only channel through which the commit layer would read an identity. It silently rewrote the committer identity of any repository Think was pointed at, including a developer's own source checkout, and every commit made by hand there afterwards was misattributed.That workaround existed because a capability was missing upstream. Reaching around the dependency rather than through it converted a missing feature into data corruption in someone else's repository.
The remaining direct calls carry the same latent risk: Think is guessing at Git behaviour that git-warp already encapsulates, and every guess is a place where Think's model and git-warp's model can drift apart silently.
Suggested direction
Establish the rule that Think uses git-warp's public API and nothing else, then close the gaps that currently prevent it:
init) andcore.fsmonitorpolicypushofrefs/warp/*) and reachability checks (ls-remote)Where git-warp lacks a public surface for one of these, the fix belongs upstream — as with
git-stunts/plumbing#13, which restores git's ability to read the operator's own configuration rather than having consumers inject identity.Enforcement once the surface exists: see the companion COOL IDEA for a lint ratchet.
References
git-stunts/plumbing#13— upstream fix for the missing capabilitydocs/method/backlog/bad-code/CORE_hexagonal-store-boundary.md— related boundary concern