Skip to content

feat(rjc): default profile and per-owner co-author (RIG-12374) - #249

Open
rigel-mintaka wants to merge 2 commits into
mainfrom
nebula/rig-12374-default-profile-and-per-owner-co-author
Open

rigel-mintaka wants to merge 2 commits into
mainfrom
nebula/rig-12374-default-profile-and-per-owner-co-author

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What does this do

Adds two optional fields to the rjc profile file:

  • default: a #Repo policy used when repos has no entry for the repository. Without it, unlisted repositories are still refused.
  • coAuthorByOwner: a map from GitHub owner to co-author trailer that overrides coAuthor, which becomes the fallback.

#Repo.name becomes optional so the default profile needs no name. The README documents both fields.

Why do we need it

A deployment that wraps rjc with its own profile file needs unlisted repositories to fall back to a policy. It also needs a different co-author for one GitHub owner. Neither is expressible today.

Summary

Both fields are optional, so existing profile files load unchanged.

Verification

  • TestProfileForDefaultAndOwnerCoAuthor: all six cases pass, including a listed repo winning over default and a second owner falling back to coAuthor. Forcing ProfileFor to always use default fails the listed-repo case.
  • gofmt and go vet: rc 0.

Risks

The full tools/rjc suite times out at 600s on the build host. It also times out on main without this change, in a different test, so the hang predates this PR.

Additional required section

Not applicable.

Checks skipped: nebula has no pre-push hook config; GitHub Actions ci.yaml runs its checks

Refs RIG-12374

Co-authored-by: Matt Wilkinson matt@rigel.build

A profile file may now set `default`, used for a repository absent from
`repos`, and `coAuthorByOwner`, which overrides `coAuthor` per GitHub
owner. Both are optional, so existing profile files load unchanged.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@linear-code

linear-code Bot commented Nov 23, 2026

Copy link
Copy Markdown

RIG-12374

@rigel-mintaka

Copy link
Copy Markdown
Contributor Author

Review round 1 at f5a988a

0 high, 1 medium, 3 low. ProfileFor selection is correct: a listed repo wins over default, which was confirmed with a probe. Owner matching is case-insensitive throughout, using EqualFold. The four new cases pass, go vet is clean, and the diff names no private repos or hosts.

# Sev Finding Action
1 M TestProfileForDefaultAndOwnerCoAuthor has no case where a listed repo beats default. A regression that always applies default stays green. Fix: give the test default a distinct prefix and add a listed-repo case.
2 L No case checks that the owner override does not apply to another owner. Fix: add a second owner.
3 L Config.CoAuthor gained omitempty, but schema.cue still requires it. Fix: revert the tag.
4 L The #Config header comment says every value is required. Fix: update the comment.

The test default now has its own prefix, so a listed-repo case can
fail if default ever replaces a listed entry. A second owner checks the
global co-author fallback. The coAuthor tag matches the schema again.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka

Copy link
Copy Markdown
Contributor Author

All-clear at b4c1071
Base: main

All-clear at b4c1071

Round 2: 0 high, 0 medium, 0 low. All four round-1 findings are fixed. The six TestProfileForDefaultAndOwnerCoAuthor cases pass. The two earlier surviving breaks now fail the test:

  • "default always replaces a listed entry" fails the listed-repo and owner-override cases.
  • "override applied for any owner" fails the second-owner case.

go vet is clean and gofmt -l lists nothing. No private names appear in the diff or the body.

This branch had an error being deployed

1 failed deployment
ci — b4c1071e Deployed Nov 23, 2026 by rigel-mintaka via CI (aarch64-linux) #1183
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