docs: the sweep is manual; Operations360 is where it's headed - #50
Merged
Conversation
The runbook shipped claiming "a cloud routine runs the sweep weekly". It doesn't. A test run showed the cloud sandbox has no gh binary at all (exit 127, nothing at /usr/bin, /usr/local/bin, /opt/homebrew/bin), and the entire sweep is built on gh api. The routine is disabled, not deleted. Fixing it needs an environment setup step to install gh AND a PAT with CSA-Internal read stored in cloud config. That second half is a credential decision, not a technical one, so it is parked rather than worked around: a local run already has exactly that access without minting a new org-scoped token. Periodic jobs like this are headed for the planned Operations360 platform — the operations sibling to CINO-Customer-360 and Work360-*. No repo exists as of 2026-09-01, so it is recorded as a plan, not a dependency. Restructures the routine section into a scheduler-agnostic job spec, so whatever ends up running this (Operations360, a routine, launchd) has one reviewable definition in the repo rather than in a scheduler config. Keeps the one non-negotiable requirement explicit: exit 2 must stay distinct from exit 0, because "could not check" and "nothing to check" are different answers and collapsing them is worse than having no sweep. Also corrects the doc header and the CLAUDE.md pointer, both of which implied automation that does not exist.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #49, which shipped a runbook claiming "a cloud routine runs the sweep weekly." It does not, and the doc needed to stop saying so.
What the test run found
I triggered the routine once #49 landed. It read the runbook, followed the spec, and died at step 2:
ghis absent from the cloud sandbox entirely — not a token-scope problem. Nothing at/usr/bin/gh,/usr/local/bin/gh, or/opt/homebrew/bin/gh. The sweep is built end-to-end ongh api, so it cannot run there as written.Two things the run did prove, and they are why the structure below is worth keeping:
docs/periodic-sweep.mdand followed it without the prompt restating the stepsWhat changed
trig_01TQh4GMWKRnt4L4QpM5mhJcis disabled, not deleted, so the wiring survives if Operations360 uses the same mechanism.Running this as a scheduled routine→How this gets run+### The job spec. The spec is now scheduler-agnostic: Operations360, a routine, or a launchd timer can all implement it, and the definition stays reviewable in the repo instead of buried in a scheduler config.CINO-Customer-360andWork360-*. No repo exists as of 2026-09-01, so it is written as a plan, not a dependency.gh.Why the cloud path is parked rather than fixed
It needs two things: an environment setup step installing
gh, and a PAT with CSA-Internal read access stored in the routine config. The second is a credential decision. The sweep's entire purpose is reading private orgs, and a local run already has that access without minting and storing a new org-scoped token — so the cloud route buys "runs when the Mac is off" at the cost of a new long-lived secret. That trade is worth making deliberately, if at all.The one requirement carried forward
Whatever eventually runs this must keep exit 2 distinct from exit 0. "Could not check" and "nothing to check" are different answers; a green light nobody earned is more dangerous than no light. That is now stated as a spec requirement rather than an implementation detail of one script.
Verification
./tools/check-all.sh— all checks pass. Docs-only change; no script behaviour touched.