Skip to content

Comment commands address the adopter's own App - #131

Merged
charlesgreen merged 2 commits into
mainfrom
app-name-mention
Aug 2, 2026
Merged

Comment commands address the adopter's own App#131
charlesgreen merged 2 commits into
mainfrom
app-name-mention

Conversation

@charlesgreen

Copy link
Copy Markdown
Contributor

Replaces /simplycubed <verb> with @<your-app> <verb>, per the research on #112.

Why the prefix was wrong

/simplycubed fixed the multi-tenant bug but gave up the thing that makes a handle worth having. GitHub offers accounts with repository access in the autocomplete, so a real mention completes after someone types @a — they never need to know the bot's name. A prefix that is not an account cannot do that, and typing / opens GitHub's own menu, which is a fixed set of five built-ins and matches nothing.

Atlantis reaches the same conclusion for the same shape of problem: --executable-name, configurable "when running multiple Atlantis servers against a single repository."

The design

appName: in .github/simplycubed.yml is the source of truth. The parser, help text, unknown-command reply, and wrong-surface replies all render from it, so the agent never tells anyone to mention a different account. It accepts acme-code, @acme-code, or acme-code[bot] — all three are how people write the same App.

The workflow trigger stays a literal, written by init from that same value. This is the part worth understanding: a workflow decides whether to start before any code runs. Matching loosely there would spin up a runner every time someone mentions a colleague — token, checkout, Go, CLI, sandbox, ~30s — to then do nothing.

The cost, and how it is handled

The handle lives in two files and the App can push only one of them. So preflight fails when they disagree, naming both and saying to re-run init --workflow. Without that the failure is silent in the worst way: comments just stop working, with no error anywhere.

init --app-name is now required, with an error that explains why rather than just demanding a flag. Re-running init without it keeps whatever the config already says, so upgrading does not silently change the handle a team already types.

Documentation

docs/setup.md gains a section on why the handle is per-repository, which file owns it, and what to do on rename. The README shows a worked example with acme-code. Troubleshooting and STATUS follow.

Tests

Handle normalisation; one repo's bot not answering to another's; empty appName parsing nothing; drift caught with both names in the message; no caller workflow being a valid local setup.

This is a v0.3.0: it changes the config schema, makes an init flag required, and changes the command surface.

App names are globally unique, so every installation has a different bot
login. A constant handle could never be right in more than one repository:
ours matched nothing in anyone else's, and because our App is public it
rendered there as a mention of an account they never installed.

/simplycubed avoided that but gave up the thing that makes a handle worth
having. GitHub offers accounts with repository access in the autocomplete,
so a real mention completes after someone types @A, without them knowing
the bot's name. A prefix that is not an account cannot, and typing / opens
GitHub's own menu, which then matches nothing.

appName in .github/simplycubed.yml is the source of truth. The parser, the
help text, and the wrong-surface replies all render from it, so the agent
never tells anyone to mention a different account.

The workflow trigger stays a literal, written by init from the same value.
A workflow decides whether to start before any code runs, so matching
loosely there would spin up a runner every time someone mentions a
colleague: token, checkout, Go, CLI, sandbox, roughly thirty seconds, to
then do nothing.

That means the handle lives in two files and the App can only push one of
them. preflight fails when they disagree, because the alternative is
silent: comments stop working with no error anywhere.
@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.46835% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/simplycubed/main.go 96.22% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Codecov flagged 10 uncovered lines across main.go and command.go. Every
one was a branch the change added and nothing exercised.

resolveAppName decides what handle init writes, so each way it can be
reached is now pinned: the flag, an existing config, the flag overriding a
config, and neither. That last one matters most, because the error has to
explain that the name is the adopter's rather than just demand a flag.

appNameFor parses --repo-dir out of flags it does not own; both spellings
are covered, since reading the wrong repository's config would silently
answer as the wrong bot.

Addressed and Parse with no configured App: a repository that has not said
which App it installed has no handle to answer to.

commandCmd surfacing a config error rather than parsing nothing, which
would look like a comment the agent chose to ignore.
@charlesgreen
charlesgreen merged commit a02b65f into main Aug 2, 2026
3 checks passed
@charlesgreen
charlesgreen deleted the app-name-mention branch August 2, 2026 12:54
@charlesgreen charlesgreen mentioned this pull request Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant