Repository navigation
Conversation
autter whoami --short (-s) prints `<email> (<org>) <state>` and keeps the full report's exit rule (fails when not logged in and no API key). Unit tests for the formatter, the exit rule and API-key masking. Test PR for Autter's product walk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
| Goal | With this PR | Result |
|---|---|---|
| User checks what the whoami command offers and sees usage text | 3/3 | Pass |
| User runs whoami outside a git repository and gets a clear | 3/3 | Pass |
Package walk of autter: autter-test-git-shim looks like the project's own tooling (a test helper, shim or fixture that the README doesn't mention), so the walk didn't run it.
Known autter journeys: 4 replayed with no model decisions; 4 still work.
Saved 2 new autter journeys from this PR's goals, to replay on later PRs that touch the same files.
Steps Autter took (4)
- check “autter: packages with
cargo package” — completed - check “autter: a clean consumer crate builds against the packaged crate” — completed
- check “autter: the binaries build from the packaged crate” — completed
- check “autter:
autter --helpruns” — completed
Live view: streamed through the Autter API relay from us-west-2.
Trying the change like a user doesn't block merging.
🧪 Test run: couldn't run everything
Autter checked 46159e97.
Tests couldn't run: a test suite this PR doesn't touch was already failing.
⚠️ Functional: couldn't run: a test suite this PR doesn't touch was already failing⚠️ Regression: couldn't run: the affected tests couldn't start
Autter couldn't run your tests because…
- A test suite this PR doesn't touch was already failing (functional).
👉 Nothing to do for this PR. That suite fails without your change too.
This is about Autter's setup, not your code.
Full test report
This PR changes 1 source file. It ran the project's test command for the workspace this PR touched, because those suites are the fastest check that the change did not break existing behavior. It wrote 1 temporary test for changed files that had no matching test, so the new behavior is still checked. It also executed 1 check from the PR's test plan.
Targeted agent checks: Autter ran targeted checks against the files this PR changed — it executed uncovered test-plan items and, where a changed file had no matching test, wrote a temporary test to verify the new behavior.
Execution summary: 2 checks executed · 1 passed · 1 failed.
Why suites failed
- autter —
cargo test: the failing test names no file this PR changes, so it most probably fails on the base branch too.
First error:test api::types::tests::test_cas_upload_result_with_error ... ok
Project test commands
| Scope | Command | Result |
|---|---|---|
| autter | cargo test |
❌ failed · 76s |
Autter targeted verification
1 test executed · 1 passed.
Code-level simulations
Revision 46159e97e894 · 421.8s · up to 2 scenarios in parallel
- Short output and -s alias for a signed-in identity — execution incomplete (code_diff, code_diff, spec)
Source: src/commands/whoami.rs — let org_slug = auth.orgs.first().and_then(|org| org.org_slug.as_deref());
Source: src/commands/whoami.rs — println!("{}", short_identity(&auth.state, auth.email.as_deref(), org_slug));
Source: PR description — It addsautter whoami --short(-s), which prints one line,<email> (<org>) <state>, for scripts and shell prompts.
Ran: python3 '.autter/scratch/whoami_short_harness.py'
Indexed blast radius: 0 direct / 0 transitive dependents (indexed 2026-08-31T13:52:36.822Z).
Could not complete: Simulation did not emit exactly one completed assertion report. File "/tmp/autter-wt-sim-1f7c6a83bdb1e009e995-OsWZxu/tree/.autter/scratch/whoami_short_harness.py", line 197 - Help precedence and unknown-argument failures — execution incomplete (code_diff, code_diff, spec)
Source: src/commands/whoami.rs — .any(|arg| arg == "--help" || arg == "-h" || arg == "help")
Source: src/commands/whoami.rs — std::process::exit(crate::commands::EXIT_USAGE_ERROR);
Source: PR description — Unknown arguments are still a usage error.
Ran: node '.autter/scratch/whoami-help-precedence.mjs'
Indexed blast radius: 0 direct / 0 transitive dependents (indexed 2026-08-31T13:52:36.822Z).
Could not complete: The check stopped on an internal error. - Short output preserves non-logged-in auth state labels — execution incomplete (code_diff, code_diff, code_diff, spec)
Source: src/commands/whoami.rs — AuthState::SyncBlocked => "cloud sync blocked".to_string(),
Source: src/commands/whoami.rs — AuthState::RefreshExpired => "credentials expired".to_string(),
Source: src/commands/whoami.rs — if identity_failed(&auth.state, has_api_key) {
Source: PR description — It keeps the full report's exit code: 1 when not logged in and no API key is set.
Ran: python3 '.autter/scratch/whoami_short_auth_labels.py'
Indexed blast radius: 0 direct / 0 transitive dependents (indexed 2026-08-31T13:52:36.822Z).
Could not complete: Simulation did not emit exactly one completed assertion report. simulation infrastructure error: startup command failed (128): git - API-key masking in the full report and no key leakage in short output — execution incomplete (code_diff, code_diff, spec)
Source: src/commands/whoami.rs — let masked = mask_api_key(api_key);
Source: src/commands/whoami.rs — let has_api_key = ApiContext::new(None).api_key.is_some();
Source: PR description — Unit tests insrc/commands/whoami.rscover the formatter, the exit rule and API-key masking.
Ran: node '.autter/scratch/whoami-api-key.mjs'
Indexed blast radius: 0 direct / 0 transitive dependents (indexed 2026-08-31T13:52:36.822Z).
Could not complete: Simulation did not emit exactly one completed assertion report. Harness infrastructure error: Creating isolated worktree failed - Concurrent CLI personas remain isolated — execution incomplete (code_diff, code_diff, spec)
Source: src/commands/whoami.rs — let auth = collect_auth_status();
Source: src/commands/whoami.rs — let has_api_key = ApiContext::new(None).api_key.is_some();
Source: PR description — What the walk should exercise: the CLI walk, which builds the binary and runs it, including the concurrency personas.
Ran: node '.autter/scratch/whoami-concurrency.mjs'
Indexed blast radius: 0 direct / 0 transitive dependents (indexed 2026-08-31T13:52:36.822Z).
Could not complete: Simulation did not emit exactly one completed assertion report. (node:39122) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake. - Full report remains multi-line and preserves signed-out exit behavior — execution incomplete (code_diff, code_diff, spec)
Source: src/commands/whoami.rs — if short {
Source: src/commands/whoami.rs — println!("API Base URL: {}", api_base_url);
Source: PR description — Runautter whoamiand confirm full output is unchanged apart from key masking.
Ran: python3 '.autter/scratch/whoami_multiline.py'
Indexed blast radius: 0 direct / 0 transitive dependents (indexed 2026-08-31T13:52:36.822Z).
Could not complete: Simulation did not emit exactly one completed assertion report. Traceback (most recent call last):
Source unavailable: Production traffic data was not available for this run.
Coverage limitation: No production patterns or runtime IDs were supplied, so no production-derived scenario is included.
Coverage limitation: The changed behavior is local CLI argument parsing and auth-status formatting; these scenarios require no disposable Postgres database.
Declared tests: 4 test file(s) found — 0 ran, 4 not observed in suite output, 0 did not run.
"Not observed" means a test command ran but never named the file in its output. A runner that stops at the first failure, shards its files, or prints only a summary produces this. Autter cannot confirm these tests ran, so it does not count them as passed. The autter command failed here, so the files after the failure most probably never started.
⚠️ Test cases that did not run
- ❔
agent-support/vscode/src/test/extension.test.ts(1 case) — its suite (autter) failed before it reported this file - ❔
agent-support/vscode/src/test/semver.test.ts(5 cases) — its suite (autter) failed before it reported this file - ❔
agent-support/vscode/src/test/vscode-hooks.test.ts(2 cases) — its suite (autter) failed before it reported this file - ❔
npm/install.test.js(3 cases) — its suite (autter) failed before it reported this file
Tests for this change
Autter wrote 1 temporary test for changed files that had none (1 passed, 0 failed).
Change coverage (is each changed file's behavior verified by a test?)
| Changed file | Related test | Result |
|---|---|---|
src/commands/whoami.rs |
src/commands/whoami.rs |
✅ no declared test — temporary test passed |
🤖 Coverage-check evidence
src/commands/whoami.rs
Temporary tests are written under .autter/scratch/ for verification only — they are never committed to the repository.
Test plan (from the PR description)
- ⬜ Run
task devto install the local debug build. — needs manual verification - ⬜ Run
autter whoamiand confirm full output is unchanged apart from key masking. — needs manual verification - ⬜ Run
autter whoami --shortandautter whoami -sand confirm both produce the condensed output. — needs manual verification - ⬜ Run
autter whoami --help,autter whoami -handautter whoami helpand confirm usage text with exit code 0. — needs manual verification - ⬜ Run
autter whoami --bogusand confirm the error on stderr. — needs manual verification - ⬜ Run
autter whoamiwhile signed out and confirm the output is still sensible. — needs manual verification - ❌ Run
task testand confirm it passes. — cargo test failed - ⬜ Run
task lintandtask fmtand confirm no issues remain. — needs manual verification
⬜ items could not be verified automatically and still need a manual check.
🚦 Pre-merge checks: 1 worth a look, 164 passed
| Check | Status | Explanation |
|---|---|---|
| Missing linked tracker issue | 1 potential issue(s) detected (max risk 50/100): src/commands/whoami.rs:14. |
✅ 164 passed
Too many files changed · Too many lines changed · Too many unrelated chapters · Generated files hiding real changes · Missing PR context · Mixed concerns (refactor + behavior change) · Migration + app logic + UI combined in one PR · Sensitive data in logs · Log injection · Missing audit logging · Removed observability · Rate limiting not detected · Rate limiting removed · Batch size limit not detected · Pagination not detected · Merge-blocking marker left in the change · Known-defect marker shipped in code · Untracked TODO without an issue reference · Test disabled or left pending · Redundant alias / duplicate import · Redundant type construct · Unnecessary type assertion · Module smell · Dead export (no callers) · Code duplication / DRY violation · Silent exception swallowing · Unhandled promise rejection · Circuit breaker not detected · Stack trace leakage · Multi-write without detected transaction · Possible TOCTOU in critical path · Idempotency key not detected · Possible non-atomic read-modify-write · Optimistic locking not detected · Prompt injection risk · LLM output used in a dangerous sink · Sensitive data in prompt or system-prompt leakage · Over-privileged LLM tool / excessive agency · Missing validation on an LLM-driven decision · Unbounded LLM usage (denial-of-wallet) · Table exposed without row-level security · Over-broad row-level security policy · Code path that bypasses row-level security · Privileged database credential reachable from the client · Privileged query without row-level scoping · Row-level security enabled with no policy · Template-default gradient styling · Interchangeable AI marketing copy · Placeholder content shipped to users · Emoji standing in for an icon system · Call-to-action that goes nowhere · Templated page composition · Color outside the brand palette · Hardcoded style bypassing design tokens · Typography outside the brand type system · One-off UI instead of the shared component · Copy that does not match brand voice · Screen does not match the rest of the product · PII in logs · PII or internals leaked in error response · PII stored without application-level encryption · User data stored without retention controls · PII sent to external / cross-border destination · Lockfile resolution / integrity tampered · Dependency runs install-time lifecycle script · Possible dependency-confusion attack · Lockfile resolves a dependency the manifest does not declare · Checked-in build artefact modified without source change · Dockerfile build-step is insecure · External artefact pulled in without integrity pinning · Changed export, importer not updated · Missing CODEOWNERS reviewer approval · Missing security-team review on sensitive path · Source changes without matching tests · Migration missing rollback / down step · Frontend importing database client directly · Route handler bypassing service layer · Backend service importing UI module · Cross-context internals import · Workspace package rule violation · Inconsistent logging pattern · Inconsistent error handling · Endpoint missing input validation · Multi-write without transaction wrapper · New feature shipped without feature flag · Module placed in the wrong workspace package · Hallucinated import (package not installed) · Nonexistent package (not found in registry) · Call to function that does not exist · Generic placeholder identifier in production logic · Repetitive boilerplate (duplicated block) · Overbroad try/catch swallowing all exceptions · TODO / FIXME on critical path · Comment contradicts or fabricates code behaviour · Abstraction defined but never used · Code style differs from rest of codebase · Established pattern ignored · Unhandled edge case (null / empty / zero / boundary) · Insecure training-data / doc-example pattern · Dead code (defined but never referenced) · Deprecated API call · API pattern from wrong library version · API endpoint removed · HTTP method changed (GET ↔ POST etc.) · New required field added to request · Field removed from response schema · Response field type changed · HTTP status code changed · Auth requirement added / removed / changed · Error response shape changed · Pagination behaviour changed · Outbound webhook payload schema changed · GraphQL field removed without deprecation · GraphQL enum value removed · Connected repositories · Vendor API consumer · SQL injection · Cross-site scripting (XSS) · Path traversal · Command injection · Insecure deserialization · Weak cryptography · Hardcoded secret · Insecure randomness for security material · Unsafe file upload · Missing input validation · Unsafe CORS configuration · Unsafe / open redirect · Missing CSRF protection · Unsafe cookie / session settings · Sensitive data exposure · Invisible Unicode / Trojan Source characters · API key in source · Access token in source · Private key in source · Database connection URL with embedded credentials · Cloud credential in source · Webhook signing secret in source · OAuth client secret in source · JWT signing secret in source · Hardcoded password · Auth middleware removed from route · Route protection changed (protected → public) · Permission / RBAC check removed · Required role weakened · Admin-only route exposed to lower privilege · Token validation skipped in middleware chain · JWT verification weakened or changed · Session expiration / TTL changed · Password reset flow changed · OAuth callback / redirect handling changed · Webhook endpoint missing signature verification · Public route touches private/PII data · Code correctness issue · Runtime error risk · Resource leak risk · Data integrity risk · Maintainability issue · Co-change coupling · Scanner suppressions added · Scanner settings changed · Complexity Guard · Release Notes Curator · Intent vs. implementation
☑️ Task list (1)
- Exit non-zero for unknown whoami arguments (src/commands/whoami.rs) - Make
handle_whoamireturn or exit with a failure status when unrecognized arguments are supplied, and verifyautter whoami --bogusexits non-zero.
Generated from PR diff, blast radius, and context.
Issues found
No unresolved code findings remain for this revision — 3 finding(s) dismissed as likely false positives by verification. Dismissed findings stay listed with their verdicts in the Autter review dashboard.
3 additional non-blocking finding(s) are available in the Autter review.
🤖 Release Notes Curator
Release impact: minor. This adds a new user-facing capability, autter whoami --short (with -s alias), for a one-line identity summary. Nothing existing breaks: unknown arguments still error as before.
Changelog entry:
- Added
autter whoami --short(or-s) for a one-line summary of who you are signed in as, your organization, and your login state. It is handy in scripts and shell prompts. The command exits non-zero when you are logged out and no API key is configured.
Custom agent · runs after review · configured in Autter
📄 What this PR changes
Users can run autter whoami --short (or -s) for condensed output. Unrecognised arguments now produce an error instead of being ignored, and whoami gains masked API key display.
- Argument parsing in
handle_whoamidetects--short/-sand filters them out before checking for unknown arguments; the--help/-h/helpshort-circuit still runs first and exits 0. - Any remaining unknown argument triggers an
Error:message on stderr. Review whether this should exit non-zero, since that determines script behaviour. - The new
mask_api_keyhelper (around lines 151-227 in the new file) is the main addition; check that it never prints a full key in either short or full output. - Short and full output both draw on
collect_auth_statusandformat_unix_timestampfromcrate::auth, so no new auth logic is introduced. - No persistent state, config, or database changes are involved.
📖 What these words mean
- Must fix: Blocks merging. Autter is confident this is a real problem in this PR.
- Should fix: Doesn't block merging, but is likely a real problem worth fixing.
- Minor: Style, conventions or hardening ideas. Fine to skip.
- Simulated users: Autter runs your app, package or CLI the way people would, each with a different habit (follows the docs, mistypes a command, …).
- Already broken before this PR: The same failure happens on the code before this PR, so this PR didn't cause it.
- We couldn't tell: Some runs failed, but not clearly enough to blame this PR.
- Doesn't block merging: Shown for your information; the merge check ignores it.
View this PR in Autter · Checked commit 46159e9 · Tick Re-run review to check this commit again
|
🟡 [deterministic] Build failed: autter — Risk: 40/100
What happened: The build failed because your Rust compiler version (1.85.0) is older than what several dependencies require, such as ratatui and time which need 1.86.0 or 1.88.0. How to fix: Upgrade your Rust toolchain to at least version 1.88.0 using rustup, or downgrade the conflicting dependencies to versions compatible with rustc 1.85.0 using cargo update. Build output🛠 AI fix prompt (copy & paste into your coding agent)Flagged by Autter security & observability checks. |
Autter review completed — merge blockedAutter completed its review and found at least one confirmed merge-blocking finding. Autter blocked this PR: test; build. See the findings below and the full PR review for details. How to fix: Resolve the blocking finding (or have a maintainer dismiss it), then push a new commit. Other findings explain the additional warnings, but they did not independently block this PR. The merge gate remains blocked until the confirmed finding is resolved. RetryRetrying reruns the review on the same commit. If the commit is unchanged, the same finding and block may be reproduced.
Autter will post a new comment when the retry starts. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Autter approved #71 with notes: the merge gate is clear, and 3 non-blocking finding(s) remain as review detail. (Also detected: 3 finding(s) dismissed as likely false positives by verification.)
There was a problem hiding this comment.
Autter approved #71 with notes: the merge gate is clear, and 3 non-blocking finding(s) remain as review detail. (Also detected: 3 finding(s) dismissed as likely false positives by verification.)
There was a problem hiding this comment.
Autter approved #71 with notes: the merge gate is clear, and 3 non-blocking finding(s) remain as review detail. (Also detected: 3 finding(s) dismissed as likely false positives by verification.)
There was a problem hiding this comment.
Autter approved #71 with notes: the merge gate is clear, and 3 non-blocking finding(s) remain as review detail. (Also detected: 3 finding(s) dismissed as likely false positives by verification.)
There was a problem hiding this comment.
Autter approved #71 with notes: the merge gate is clear, and 3 non-blocking finding(s) remain as review detail. (Also detected: 3 finding(s) dismissed as likely false positives by verification.)
There was a problem hiding this comment.
Autter approved #71 with notes: the merge gate is clear, and 3 non-blocking finding(s) remain as review detail. (Also detected: 3 finding(s) dismissed as likely false positives by verification.)
🧪 Tests Autter wrote for this changeAutter wrote 5 test files for the changed code that had no test, ran them on the base commit and on this PR, and kept 3: 3 files passed. The tests
|
There was a problem hiding this comment.
Autter approved #71 with notes: the merge gate is clear, and 3 non-blocking finding(s) remain as review detail. (Also detected: 3 finding(s) dismissed as likely false positives by verification.)
This is a test PR to exercise Autter's product walk. It will not be merged.
It adds
autter whoami --short(-s), which prints one line,<email> (<org>) <state>, for scripts and shell prompts. It keeps the full report's exit code: 1 when not logged in and no API key is set. Unknown arguments are still a usage error.Unit tests in
src/commands/whoami.rscover the formatter, the exit rule and API-key masking.What the walk should exercise: the CLI walk, which builds the binary and runs it, including the concurrency personas.
Note: this was written without a local Rust toolchain, so CI and the walk's build are the compile check.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary
Summary generated by Autter.
Why this change
autter whoamihas no compact output mode for scripts and quick checks, and it silently accepts arbitrary arguments. This change adds a--shortmode and tightens argument handling.What changes for users
Users can run
autter whoami --short(or-s) for condensed output. Unrecognised arguments now produce an error instead of being ignored, andwhoamigains masked API key display.Implementation and review notes
handle_whoamidetects--short/-sand filters them out before checking for unknown arguments; the--help/-h/helpshort-circuit still runs first and exits 0.Error:message on stderr. Review whether this should exit non-zero, since that determines script behaviour.mask_api_keyhelper (around lines 151-227 in the new file) is the main addition; check that it never prints a full key in either short or full output.collect_auth_statusandformat_unix_timestampfromcrate::auth, so no new auth logic is introduced.Changes
--short/-sflag toautter whoami(src/commands/whoami.rs) that produces condensed output.mask_api_keyhelper so API keys are displayed in masked form rather than in full.--help,-handhelpstill print usage and exit 0.collect_auth_statusandformat_unix_timestampfromcrate::auth; no auth logic changes.Acceptance Criteria
autter whoami --shortandautter whoami -sprint condensed auth status and exit 0 when signed in.autter whoami --help,-handhelpprint usage and exit 0.Error:message to stderr.cargo check --locked --all-targetspasses.Test Plan
task devto install the local debug build.autter whoamiand confirm full output is unchanged apart from key masking.autter whoami --shortandautter whoami -sand confirm both produce the condensed output.autter whoami --help,autter whoami -handautter whoami helpand confirm usage text with exit code 0.autter whoami --bogusand confirm the error on stderr.autter whoamiwhile signed out and confirm the output is still sensible.task testand confirm it passes.task lintandtask fmtand confirm no issues remain.Rollback Plan
src/commands/whoami.rs; this restores the previous argument handling and output.task buildand confirmautter whoamibehaves as before.Related Issues
No linked issue was identified from the branch name, commit messages, or diff context.
Written for commit 46159e9. Summary will update on new commits.