Infer --commit-scope from a path arg when unambiguous, followup to #104 #105
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Followup to coilysiren/coily#104 (sticky scope). Even with sticky scope, there's a class of one-off cross-repo calls where Kai knows the target repo from the command itself - she's passing a path inside it. Today she still has to type
--commit-scope=<that-same-repo>alongside the path.Proposal
When
--commit-scopeis not passed and sticky scope is unset, look at the command's positional path arguments. If exactly one resolves to a path inside a known~/projects/coilysiren/*repo, use that repo as the scope. If zero or more than one match, fall through to the currentscope_unresolvederror.Audit log
Audit row records the resolved scope plus the source (
flag/sticky/inferred-from-arg/env). Adding the source field is a small schema bump but makes "why did this call attribute to repo X" debuggable later.Risk
Magic. A command that happens to mention a path in repo Y when Kai meant repo Z attributes to Y silently. Mitigations:
[scope: <name> (inferred from <arg>)]so the inference is visible.scope useis the way to lock attribution.Sequencing
Land coilysiren/coily#104 (sticky scope) first. Sticky handles the 95% case. This issue handles the residual cross-repo one-offs and is only worth doing if that residual still feels annoying after sticky ships.
Origin
Chat with Kai 2026-05-26, deferred from coilysiren/coily#104 as out-of-scope.