Skip to content

ci: configure hosted Mac quota for the organization move - #408

Merged
SSFSKIM merged 4 commits into
masterfrom
hosted-cap-config
Oct 31, 2026
Merged

SSFSKIM merged 4 commits into
masterfrom
hosted-cap-config

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Make the hosted-Mac quota configurable before MAWS moves to an Enterprise organization. With no new variables set, placement retains today's five-slot cap and five-repository sampler list.

What changes

  • HOSTED_MAC_CAP defaults to 5 and refuses values other than positive whole numbers. Both workflow planner steps, the alert preflight, identity planner and pool-demand planner receive it. The preflight and pool-demand builder share one exported list of planner variables.
  • HOSTED_MAC_REPOS accepts comma/whitespace-separated owner/repo names, defaulting to the existing five. Invalid entries retain their configuration diagnostic and refuse both the sampler CLI and launcher with exit 2, before a push; advisory API/cache failures still fail open. The sampler counts MAWS first and completely, even if the list omits or repeats it; other repositories retain their lower-bound behavior at the call cap.
  • The sampler takes MAWS's identity from ci-gate's REPO for runners, completeness checks and the EC2 queue. The default quota retains the legacy cache/lock names for sharing with older callers; changed repository/quota lists get keyed names so a config change cannot reuse another quota's fresh counts.
  • ci-gate derives REPO from the target's HTTPS or SSH GitHub origin (including port-qualified github.com and ssh.github.com origins), falling back to SSFSKIM/MAWS for non-GitHub origins. Every existing repository-scoped call, including interrupt cancellation, follows that identity rather than transfer redirects.

Verification

Head: 537b76b64a4abbdd264e59585904b2ee9bef42d5.

  • TDD: the five caller test files first failed nine new cases (cap placement/validation, alert preflight, pool planner, destination sampler, launcher handoff and cancellation); after implementation, 187/187 passed.
  • Cache isolation: separately reproduced a config change reusing the old five-repository count (5 instead of 1); the sampler file then passed 14/14 including the added regression.
  • Final-head static acceptance 41219846483 passed on attempt 1: plan and static succeeded, the launcher exited 0 and removed its temporary CI ref. Launched through detached origin/master with --gates static --class1a pool --peer none --label hosted-cap-config. The pre-review-fix acceptance also passed.
  • The first static run (41218843249) caught a missing explicit URL import in the new test; fixed. Run 41219174032 was cancelled when the identity fixture correction superseded its head.
  • Identity caller: corrected its variable-list fake to return an empty value for absent optional variables, rather than a route string for every query. A regression first demonstrated the resulting silent fallback; 9/9 identity tests now pass and explicitly check that normal default planning keeps the pool hint.
  • Only the six touched test files were run locally. No full local suites, Mac/service/settings changes, secrets reads, Decision Log edits or tracker edits.

Review follow-up

All three P2 findings were fixed in 537b76b64a4abbdd264e59585904b2ee9bef42d5: configuration errors no longer disappear into the cache fallback; default callers still share the legacy cache and lock; SSH origins with explicit ports retain the destination repository. Four caller regressions first failed, then the two touched test files passed 42/42.

For the architect

Land behavior-neutral first. At the move window, update origin, set HOSTED_MAC_CAP=50 and HOSTED_MAC_REPOS=<ORG>/MAWS, and keep HOSTED_MAC_ROUTE=direct. No deployment or variable changes are needed to land this PR. The existing canonical name in the alert reader remains the plan's separate move-window item.

Implementation decision for the landing record: non-default quota configurations also namespace the existing sampler cache and lock; the defaults retain the legacy paths. Otherwise the first post-change invocation could consume a still-fresh sample from the previous account. No substantive deviation from A3/A7.

This PR is for the architect to land; it is not merged by this worker.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)

Keep the five-slot, five-repo defaults until the organization move. Pass the cap through both workflow planners and local preflight callers; sample the target repository completely and scope cached backlog by quota configuration.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T16:20:56.633560Z 2cc0031 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
The identity fixture previously returned the route string for every variable query. Model absent optional variables and assert the default label and pool hint do not silently fall back.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Separate malformed configuration from advisory sampling failures and propagate refusal through the launcher. Retain the legacy cache and lock for the default quota, and recognize port-qualified GitHub SSH origins. Cover all three review findings through the CLI callers.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
@SSFSKIM
SSFSKIM merged commit 90d7732 into master Oct 31, 2026
@SSFSKIM
SSFSKIM deleted the hosted-cap-config branch October 31, 2026 16:33
SSFSKIM added a commit that referenced this pull request Oct 31, 2026
… master 90d7732: hosted-Mac cap and quota repos as repository variables, ci-gate's REPO from origin) and ci-kit side (#185 per-owner App installation, #184 the guest lane's repository, sandbox #67 probe targets), deployed and baked green

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Oct 31, 2026
…st reads retried after an mawsd restart), #408

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

# Conflicts:
#	src/renderer/src/ipc/events.test.ts
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