Skip to content

docs: the sweep is manual; Operations360 is where it's headed - #50

Merged
kurtseifried merged 1 commit into
mainfrom
docs/sweep-operations360
Sep 1, 2026
Merged

docs: the sweep is manual; Operations360 is where it's headed#50
kurtseifried merged 1 commit into
mainfrom
docs/sweep-operations360

Conversation

@kurtseifried

Copy link
Copy Markdown
Contributor

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:

tool_use Bash: gh api repos/CloudSecurityAlliance-Internal/CSA-Plugins
tool_result ERROR: Exit code 127
  /bin/bash: line 1: gh: command not found

gh is 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 on gh api, so it cannot run there as written.

Two things the run did prove, and they are why the structure below is worth keeping:

  • runbook-as-spec works — the agent read docs/periodic-sweep.md and followed it without the prompt restating the steps
  • the guard held — it stopped and reported inability rather than emitting a false all-clear

What changed

  • Routine trig_01TQh4GMWKRnt4L4QpM5mhJc is disabled, not deleted, so the wiring survives if Operations360 uses the same mechanism.
  • Running this as a scheduled routineHow 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.
  • Operations360 recorded as the long-term home for periodic jobs like this — the operations sibling to CINO-Customer-360 and Work360-*. No repo exists as of 2026-09-01, so it is written as a plan, not a dependency.
  • Header and CLAUDE.md pointer corrected — both implied automation that does not exist. They now say manual, weekly, needs CSA-Internal 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.

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.
@kurtseifried
kurtseifried merged commit 0fd76cd into main Sep 1, 2026
6 checks passed
@kurtseifried
kurtseifried deleted the docs/sweep-operations360 branch September 1, 2026 16:18
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