Skip to content

Promote staging → main: shared auth lib (#58) + accumulated staging work - #62

Merged
qiuethan merged 35 commits into
mainfrom
staging
Jul 5, 2026
Merged

Promote staging → main: shared auth lib (#58) + accumulated staging work#62
qiuethan merged 35 commits into
mainfrom
staging

Conversation

@qiuethan

@qiuethan qiuethan commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Promotes staging to production. Includes #58 (shared platform_auth library + uv workspace + repo-root Docker), the bot /team + /my-teams beta→stable promotion + autocomplete, CODEOWNERS + Discord PR notifier (#34/#37), and blocked→ready CI automation. All validated on staging.

Post-merge (manual, driven separately): prod team-tracking + documentation-system need rootDirectory=/ + railwayConfigFile pointed at their railway.json (switch RAILPACK→DOCKERFILE), then re-scale to us-east.

qiuethan and others added 30 commits July 3, 2026 14:27
Extract the team-slug autocomplete into a shared teamAutocomplete module
so /doc and /team share one timeout-hardened implementation, then wire an
all-teams resolver into /team rename, add, remove, and roster.

Two resolvers, differing only in scope:
- myTeamsAutocomplete: caller's own active teams (used by /doc).
- allTeamsAutocomplete: ALL active teams. /team's admin subcommands act on
  any team, so scoping to the caller's memberships would wrongly hide teams
  they aren't on. The full active-team list is already visible via
  `/team list` (auth: linked), so this discloses nothing new.

Both gate on a resolved principal and bound their directory lookups against
the autocomplete budget, degrading to no suggestions rather than hanging
past Discord's ~3s window.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(bot): team-slug autocomplete for /team admin subcommands
The /doc command group (add/list/show/remove) shipped, so documentation-system
is no longer "no consumer yet". Update the services table, the API list, the
beta-commands section, and the bot command count (3 stable + 3 beta).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Per-area CODEOWNERS (all @qiuethan for now, one line per area as a
hand-off point for future hires).

Two-channel Discord notifier via decoupled webhook secrets:
- DISCORD_STAGING_WEBHOOK: PRs into staging, only on review_requested
- DISCORD_PROD_WEBHOOK: non-draft PRs into main, always

pr-zone-check warns (non-blocking) when a PR spans multiple zones.

Requiring review from each touched zone is handled by enabling
"Require review from Code Owners" in branch protection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
docs: fix README drift — documentation-system now has a /doc consumer
feat(ci): CODEOWNERS + Discord PR notifier + multi-zone check (#34)
Adds a workflow that reads a `Blocked by: #n` footer in issue bodies and,
on blocker close/reopen, swaps the `blocked`/`ready` labels on dependents
(and sets the project board Status if a PROJECTS_TOKEN secret is present).

See #33 (LLM service epic) for the first blocker graph.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Re-block now sets project Status to the new "Blocked" option instead of
  Backlog.
- stateOf() catches per-blocker lookup errors (deleted/inaccessible issue no
  longer aborts the whole run); 'unknown' counts as outstanding, never ready.
- gqlPAT() gets a 10s abort timeout and checks res.ok before parsing.

Addresses CodeRabbit review on #47.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CI: auto-mark issues ready when blockers resolve
Add Railway-targeted npm scripts (register:staging / register:production /
register:all) plus a guarded scripts/register.sh so re-registering slash
commands after a command change is one memorable command that always does
staging first and can't silently skip it (#38). register.sh confirms before
touching production. Docs (RAILWAY-DEPLOYMENT section 5, discord-bot README)
now point at the wrapper and clarify register (local test bot) vs register:*
(Railway envs).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(bot): thin wrapper for Discord command registration (#39)
Flip beta: true -> false in team.js and my-teams.js so both register
globally (visible in every UTMIST server) instead of test-guild-only.
/doc stays beta. Write subcommands remain admin-gated.

Update README: move both commands to the Stable list, drop them from
Beta, and adjust the bot services-table counts (stable 3->5, beta 3->1).

Closes #38

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The promotion flipped both to beta: false, so the three tests that
asserted beta: true (and that team/my-teams/doc were the only beta
commands) now expect stable. /doc is the sole remaining beta command.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(bot): promote /team and /my-teams from beta to stable (#38)
The blocked-ready automation only triggered on closed/reopened, acting on
a blocker's *dependents*. It never evaluated a freshly-created issue's own
"Blocked by:" line, so initial blocked/ready state never landed without
manual labelling.

Add opened/edited handling: the changed issue reads its own "Blocked by:"
line and sets its own blocked/ready label + board Status from the current
state of its blockers. No line = no-op. Proven close/reopen dependent
logic is untouched.

Also add assigned/unassigned tracking so the ready queue stays honest:
assigning drops `ready`; fully unassigning restores it (+ board Ready)
unless the issue is still blocked or closed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
An edit can land on a closed issue (would mark a done issue ready) or an
assigned/in-progress one (would re-add `ready`, undoing the assignment
strip). Guard the self-blocker sync with the same state/assignee checks the
assigned/unassigned flow already uses.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(ci): self-evaluate blocked/ready on issue open/edit + assignment
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
qiuethan and others added 5 commits July 4, 2026 17:12
Complete the change: Dockerfile and railway.json for repo-root context
(uv.lock deletion was committed separately in db0680c).
…IR is already the service dir (#58)

The repo-root Docker context sets WORKDIR to the service dir, so the railway
start/preDeploy commands must run from there (like the CMD). The added
`cd services/<svc>` double-nested the path and would fail startup/migrations.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Shared internal auth library (platform_auth) + uv workspace (#58)
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f8b779f-fb88-4d3c-ac36-bdb437048a91

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch staging

Comment @coderabbitai help to get the list of available commands.

@qiuethan
qiuethan merged commit 3116d58 into main Jul 5, 2026
19 checks passed
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