Repository navigation
autter lineage: from a runtime issue to its release, commit, PR, owner and AI authorship (3.10.0) - #105
Merged
Conversation
…r and AI authorship `autter lineage <issue-id>` reads GET /api/cli/orgs/:slug/runtime/issues/:id/lineage (optional ?repo=) with the sign-in and org choice of `autter ask`, and prints the chain top to bottom: the issue; the release it first appeared in, its commit and the release before it (or that the commit is not known); the suspect PR; the owner (assigned, else suggested); suspect commits, marking AI-only ones "written by Claude, no human author"; who wrote each failing frame (agent and model, a person, or "Not known: no authorship notes"), with the function's AI share and "Line numbers are approximate" for best-effort lines; and why the error was grouped into the issue. It prints `autter show-prompt <session>` when a transcript is stored and never prints prompt text. --json prints the response. A null part prints one line with its matching note and the command exits 0. 401, 404 (issue), 400 (unknown repository) map to plain guidance; other errors use ask's generic message. No email address is printed. `autter lineage <file>:<line>` is dispatched to `autter blame --why` (same code path). Help entry for lineage; `autter ask --help` says it answers "why did this happen" and "what is the impact" questions from Runtime evidence. README, docs/system-investigations.md and CHANGELOG updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…release, commit, PR, owner and AI authorship Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What users saw
Users asked for a CLI way to go from a production error to the code behind it: the release it shipped in, the commit, the PR, who owns it, and whether an AI agent wrote the failing code. The CLI could explain one line (
autter blame --why <file>:<line>) and answer free-form questions (autter ask), but nothing walked a Runtime issue back to its release, commit, PR, owner and authorship. That meant opening the issue page.What changes
autter lineage <issue-id>(newsrc/commands/lineage.rs) calls the lineage route the backend now serves (GET /api/cli/orgs/:slug/runtime/issues/:issueId/lineage[?repo=<name>], Autter-dev/autter-monorepo#747). It signs in and picks the organization exactly asautter askdoes (ask::org_api_context, the sameApiContext, base URL and--org). It prints the chain from top to bottom:lineCoordinatesisbest_effort.When a frame has a
sessionIdandtranscriptAvailable, the command printsautter show-prompt <sessionId>for you to run. It never fetches or prints prompt text.Other behaviour:
--jsonprints the response for scripts.--repo <name>sends the optionalrepoparameter. Without the flag the parameter is left out. The CLI has no convention for inferring a Runtime repository from the git remote:askandlogsalso send--repoonly when it is given.Null parts: a part that is
nullprints one line saying it could not be read, followed by the matching note. The command still exits 0. Each note is printed once: notes no part used are listed at the end.Errors:
autter login/--orgguidance thataskusesIssue not found: "Issue not found in this org (or repository)."Unknown repository: <name>: names the repositoryask's genericHTTP <code>: <error>Errors exit 1 and usage errors exit 2, as in
ask.Emails: no email address is printed. The server already hides them, and the command reads no git config. Fields about people (names, owner reasons, owner notes) also have any email address replaced with "(email hidden)".
Issue URLs: no existing command has a helper that pulls an issue id out of an Autter URL, so
lineagetakes ids only. It rejects a URL with a message saying to pass theri_…id.autter lineage <file>:<line>goes throughhandle_ai_blame(["--why", "<file>:<line>", …]), the same code path asautter blame --why, so nothing is duplicated. In this form it uses the background service asblamedoes. The issue-id form, likeask, does not.Help:
lineagehas a top-level entry and its own--help.autter ask --helpgains one sentence saying it answers "why did this happen" and "what is the impact" questions from Runtime evidence. Noexplainorimpactcommands were added.Docs:
docs/system-investigations.md: a new section with sample outputCHANGELOG.mdRelease: the last commit bumps the version to 3.10.0 in
Cargo.tomlandCargo.lockand moves the changelog entry under## [3.10.0] - 2026-11-15, as earlier release commits did. Merging this PR publishes autter 3.10.0 (tag-release.yml).Tests
src/commands/lineage.rs):file:line, and forwarding to blamerepoquery parametershow-prompthint?repo=, and the value printed by--jsonequals the server's JSON. 401, 404 and 400 go through the real HTTP path.tests/integration/blame_why.rs):autter lineage f.txt:Nprints exactly whatautter blame --why f.txt:Nprintshelp_flag_safetycoverslineage --helpandlineage <file>:<line> --help.Notes
--jsonpretty-prints the parsed response, asask --jsondoes. Every value and field is unchanged, but serde_json withoutpreserve_ordersorts object keys alphabetically.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.