feat!: replace --ref with global --profile selector - #29
Conversation
Replace public --ref selectors with inherited bare --profile values in gro and grw while keeping internal credential refs and environment precedence unchanged. Closes #28
Test coverage assessment — PR #29Major
Minor
|
Exercise the real gro and grw command trees so the removed --ref flag cannot return on concrete leaves. Verify inherited --profile reaches init guidance without changing configured state, and cover set-credential migration, conflict, and explicit-profile isolation against hermetic legacy fixtures. Add sentinel coverage for invalid profiles failing before leaf execution.
Use the resolved credential-ref source and profile instead of a Cobra-to-init test seam. Keep init behavior coverage at runWith, and retain only the set-credential conflict and explicit-profile migration-scope cases that distinguish the implementation from OpenRef.
Walk the real command trees for inherited profile and removed-ref guarantees, keeping only the set-credential parser rejection path. Reuse credential helpers and retain default conflict plus explicit-profile isolation coverage.
There was a problem hiding this comment.
Automated PR Review
Reviewed commit: 92417b88ec78
Profile: codex-rianjs-bot - Posting as: rianjs-bot[bot]
Summary
| Reviewer | Findings |
|---|---|
| documentation:docs | 0 |
| go:implementation-tests | 0 |
| policies:conventions | 0 |
| structure:repo-health | 0 |
Reviewer Coverage
documentation:docs— complete (broad); inspected 1 assigned file (17 inspected across reviewers):docs/development.md; skipped: none; constraints: Narrow documentation-only review; verified the changed release-version statements against version.txt, packaging/identity.yml, and repository release workflows.go:implementation-tests— complete (broad); inspected 15 assigned files (17 inspected across reviewers):internal/app/gro/backend_wire_test.go,internal/app/gro/credref_wire_test.go,internal/app/gro/root.go,internal/app/grw/profile_wire_test.go,internal/app/grw/root.go,internal/cmd/init/init.go,internal/cmd/init/init_test.go,internal/cmd/profiles/profiles.go,internal/cmd/setcred/setcred.go,internal/cmd/setcred/setcred_test.go,internal/config/config.go,internal/keychain/credref_test.go,internal/keychain/keychain.go,internal/keychain/wire.go,internal/rootutil/rootutil.go; skipped: none; constraints: Focused Go tests passed with CGO disabled and repository keyring build tags; native CGO compilation is unavailable in this workspace due to a path/toolchain error.policies:conventions— complete (broad); inspected 11 assigned files (17 inspected across reviewers):docs/development.md,internal/app/gro/root.go,internal/app/grw/root.go,internal/cmd/init/init.go,internal/cmd/profiles/profiles.go,internal/cmd/setcred/setcred.go,internal/config/config.go,internal/keychain/keychain.go,internal/keychain/wire.go,internal/rootutil/rootutil.go,version.txt; skipped: none; constraints: Focused Go tests could not build because the compiler invocation mishandled the workspace path containing spaces; this did not affect the static convention review. The optional local cli-common and shared-automation documentation copies were not present, so this review used the repository-local standards and linked breadcrumbs only.structure:repo-health— complete (broad); inspected 8 assigned files (17 inspected across reviewers):docs/development.md,internal/app/gro/root.go,internal/app/grw/root.go,internal/cmd/init/init.go,internal/cmd/profiles/profiles.go,internal/cmd/setcred/setcred.go,internal/config/config.go,internal/rootutil/rootutil.go; skipped: none; constraints: Review scoped to the assigned changed files and their directly relevant wiring/tests. Focused test command could not compile in this environment because the RTK shell proxy truncated a workspace path; the supplied validation reports focused tests and make check passing.
Inspected files (17)
docs/development.mdinternal/app/gro/backend_wire_test.gointernal/app/gro/credref_wire_test.gointernal/app/gro/root.gointernal/app/grw/profile_wire_test.gointernal/app/grw/root.gointernal/cmd/init/init.gointernal/cmd/init/init_test.gointernal/cmd/profiles/profiles.gointernal/cmd/setcred/setcred.gointernal/cmd/setcred/setcred_test.gointernal/config/config.gointernal/keychain/credref_test.gointernal/keychain/keychain.gointernal/keychain/wire.gointernal/rootutil/rootutil.goversion.txt
0 PR discussion threads considered. 0 summarized; 0 resolved.
Completed in 2m 11s | gpt-5.6-terra | cr 0.10.311
| Field | Value |
|---|---|
| Model | gpt-5.6-terra |
| Reviewers | documentation:docs, go:implementation-tests, policies:conventions, structure:repo-health |
| Engine | codex_cli · gpt-5.6-terra |
| Reviewed by | cr · rianjs-bot[bot] |
| Duration | 2m 11s wall · 4m 53s compute |
| Cost | unavailable |
| Tokens | 1.1M in / 10.3k out |
Per-workstream usage
orchestrator-selection— gpt-5.6-terra- In: 17.4k
- Out: 536
- Cache read: 11.0k
- Cache create: unavailable
- Cost: unavailable
- Duration: 13s
documentation:docs— gpt-5.6-terra- In: 82.3k
- Out: 1.1k
- Cache read: 68.6k
- Cache create: unavailable
- Cost: unavailable
- Duration: 28s
go:implementation-tests— gpt-5.6-terra- In: 482.0k
- Out: 3.3k
- Cache read: 413.4k
- Cache create: unavailable
- Cost: unavailable
- Duration: 1m 38s
policies:conventions— gpt-5.6-terra- In: 255.2k
- Out: 2.3k
- Cache read: 201.2k
- Cache create: unavailable
- Cost: unavailable
- Duration: 1m 07s
structure:repo-health— gpt-5.6-terra- In: 196.9k
- Out: 2.6k
- Cache read: 143.1k
- Cache create: unavailable
- Cost: unavailable
- Duration: 1m 21s
orchestrator-rollup— gpt-5.6-terra- In: 38.0k
- Out: 574
- Cache read: 28.2k
- Cache create: unavailable
- Cost: unavailable
- Duration: 5s
Summary
--ref <service>/<profile>selector with inherited global--profile <name>in bothgroandgrw.OpenRefuse, and JSON ref fields unchanged.2.0.Closes #28
Validation
make checkpasses, including lint, race tests, and builds.make test-cover-checkpasses at 75.5% coverage (60% threshold).mail search,init, andset-credentialshows inherited--profilewith no public--ref.--profile bad.profilefails at the validation boundary, and--refis unknown in both binaries../bin/gro profiles list --profile rstockbowermarkedrstockboweractive via--profile flag; a following unqualified list still markedmonitactive.Live
meand mail API calls stalled without output and were interrupted; they are left for operator follow-up.