Deploy a read-only code-fleet-watch k3s CronJob #668
Labels
No labels
burndown-2026-06
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/infrastructure#668
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Outcome
Deploy one read-only
code-fleet-watchCronJob that inventories the canonical Forgejo fleet, runs modular repository hygiene checks, and sends transition-aware Telegram findings without mutating repositories or pull requests.Ownership
Infrastructure owns the workload, Forgejo inventory, k3s manifest, scheduling, deployment tuning, secret projection, persistent finding state, and Telegram delivery.
AOS remains the sole owner of pre-commit policy evaluation and the public encoded
leak-guard. The workload depends on agentic-os#774 for machine-readable fleet compliance. The private SSM term sweep is a deployment backstop and does not duplicate the public AOS ruleset.Checks
private-term-sweepreads a hex-encoded denylist from an SSM SecureString, validates and decodes terms only in memory, and fixed-string scans current default-branch content. Findings expose only stable rule IDs, repository, path, line, and count.stale-branchesuses Forgejo APIs, excludes default and protected branches, and considers last commit activity plus associated open pull requests.stale-pull-requestsuses Forgejo APIs and reports age since activity, draft state, and merge or review state.aos-precommit-coveragereports missing config, invalid config, missing canonical hooks, and declared.agentic-os-ignoreopt-outs through the AOS evaluator.aos-precommit-rolloutreports coverage, explicit campaign-target progress, and latest-release freshness as separate dimensions.Runtime shape
emptyDirand rejects unexpected clone hosts.CronJob guardrails
Follow the established
forgejo-package-upload-cleanupprecedent:concurrencyPolicy: ForbidautomountServiceAccountToken: falseNotification behavior
Non-goals
Acceptance
docs/FEATURES.md, repository validation, and the canonical pre-commit suite pass.Related history
Spec addition from Kai: the private denylist also protects personal details from public code. Each hex rule declares scope
publicorall. Public-scoped rules run only when Forgejo explicitly reports the repository as public. Missing or ambiguous visibility makes the sweep incomplete, never clean. Findings remain safe metadata only and never include the decoded personal detail or matching line.Infrastructure implementation landed on canonical main at
053769d.Completed:
scope: publicrules keep encoded personal details out of Forgejo-public repositories.scope: allrules scan the full fleet. Ambiguous visibility fails closed.Live boundary still pending:
/coilysiren/code-fleet-watch/denylist, appliesforgejo.coilysiren.me/coilyco-flight-deck/code-fleet-watch:053769d62a2e5edd6bb402fab9371b59216c9a84, triggers one manual Job, and returns a log ending incomplete=truewith matching inventory coverage.The issue remains open with
interactivebecause the engineer did not deploy or iterate against live k3s.Live deployment completed.
b6b2158. API credential correction landed atc5ce201. The complete pre-commit suite passed for both.053769d62a.The AOS evaluator remains disabled pending agentic-os#774, so this issue stays open for that acceptance item.
Cadence update landed at
ceb69a0and is live. code-fleet-watch now runs once daily at 00:17 UTC with schedule 17 0 * * *. The CronJob is unsuspended and retains the proven immutable image.Compact denylist alerts are live. Observer commit
8085905renders term findings as !alias@owner/repo@branch:/path#Lline and silently retires state for removed rule IDs. Operator commit69d5fe7adds tracked ExternalSecret refresh after SSM rotation. SSM denylist version 2 now uses the semantic alias job-mention. Image publication, lint, trufflehog, and the 15 focused tests passed. Manual Job code-fleet-watch-manual-20260728220519 completed in 21 seconds with repos=32 findings=11 errors=0 complete=true. The daily CronJob is resumed on the new immutable image.Readable compact term locators are live at
e7f358b. Telegram term findings now render as ! alias | owner/repo | path, with default branch and line number omitted from both finding state and output. Image publication, lint, trufflehog, the local image build, and all 15 focused tests passed. Manual Job code-fleet-watch-manual-20260728221631 completed in 23 seconds with repos=32 findings=11 errors=0 complete=true. The daily CronJob is resumed on the new immutable image.Final compact locator format is live at
571f108: !alias@owner/repo@path. The default branch and line remain omitted. Image publication and trufflehog passed. The superseded lint run was cancelled by a newer main push, whose replacement lint and trufflehog runs passed. Fleet smoke code-fleet-watch-manual-20260728222922 completed with repos=32 findings=11 errors=0 complete=true. A separate formatter-plus-Telegram smoke Job completed 1/1 and sent !job-mention@smoke/test@README.md.Product-policy support landed on canonical main at
c28d209.product:job-mention. The prefix selects repositories carrying the matching Forgejo topic,policy-product, so deployment JSON carries no repository roster.ignore_dot_paths: trueskips root dot-prefixed paths such as.forgejo/and.github/for that rule while retaining ordinary source and documentation scanning.cli-guard,ward,agent-proxy,ward-mcp, andlunch-money-k8s. Reference MCP repositories andagent-composeremain outside.Live activation remains pending. All five topic writes returned 403 before mutation because AOSGuard uses the bot token for the admin-only topic route. agentic-os#495 now carries the evidence. SSM denylist overwrite and k3s image rollout also remain behind their required operator confirmations.
Landed the policy ownership correction in
7843853. Code Fleet Watch now reads repository classes only from metadata.policy_classes..repositories in the private SSM denylist document. Prefixed rules fail when their class is missing, malformed selectors and duplicates fail validation, the provisioner invokes the owning rules loader, and the sweep no longer reads Forgejo topics. Local pre-commit, the focused 20-test suite, and the container image build pass. The live SSM rotation and k3s rollout remain pending explicit operator confirmation because both overwrite live state.Landed and deployed the product-repository policy layer.
5bda852moves the public product roster into trackeddeploy/code-fleet-watch/config.jsonand adds compact SSM document defaults.ebfbd5dmakes each matched path a distinct term finding while migrating the old state keys without false recovery alerts.ebfbd5d6cb5949633db1c8e4ba2b5b25c499ca3con the existing daily schedule. Image, lint, and trufflehog workflows passed.code-fleet-watch-manual-20260729023641completed with 32/32 repositories swept, 38 raw occurrences, and 0 errors. Telegram enumerated 32 path-level findings after intentionally collapsing repeated lines in the same path: agent-proxy 3, cli-guard 5, lunch-money-k8s 8, ward 9, ward-mcp 7.70e60bb(ward#1614), and the subsequent Ward promote and release workflows passed.Rolling Forgejo issue reporting is landed and live.
30f8df6adds an observer init container and a separately credentialed reporter container. The observer mounts only the all-read token. The reporter mounts only the dedicatedwrite:issuePAT. They exchange sanitized alias/path metadata through a pod-local volume.30f8df6e81c9d756909d166e198ee066fc5e314dis deployed on the daily schedule. Image, lint, and trufflehog workflows all passed.code-fleet-watch-issuesis stored at/forgejo/coilyco-ops/code-fleet-watch-issue-token. Read access and create validation passed without creating a probe issue.code-fleet-watch-manual-20260729032256completed with 32 repositories, 38 findings, 0 errors, and created five rolling issues: agent-proxy#65, cli-guard#266, lunch-money-k8s#35, ward#1616, and ward-mcp#37.code-fleet-watch-manual-20260729032433completed with the same coverage and reportedunchangedfor all five issues. Each issue remains open with zero comments, proving the no-op path created no duplicate issue or comment.Closing. The workload this issue deployed is retired, tracked at #830.
The observer ran daily from 2026-07-29 to 2026-08-14. The Telegram notification surface described here was never the shipped one, the reporter used rolling Forgejo issues instead. Those five managed issues are now closed with a retirement note.