Skip to content

fix+feat: audit fixes + 3 new automation workflows + Slack reporter fix - #116

Merged
atomeam merged 4 commits into
mainfrom
devin/1781235005-aether-audit-fixes
Jun 12, 2026
Merged

fix+feat: audit fixes + 3 new automation workflows + Slack reporter fix#116
atomeam merged 4 commits into
mainfrom
devin/1781235005-aether-audit-fixes

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Fixes CI-hanging tests and adds three new GitHub Actions automation workflows to move the ops infrastructure forward.

CI fix — vitest watch mode hang: Three packages (governance, throttle, notion-worker) used "test": "vitest" which starts watch mode in CI, hanging forever. Changed to "vitest run". This was causing npx turbo run test to never complete.

Slack RUN reporter fix: _slack-run-report.yml had a broken multiline heredoc that produced malformed JSON. Rewrote with proper shell escaping via python3 -c json.dumps(...). Also fixed slack-run-reporter-smoke.yml which referenced ./_slack-run-report.yml instead of ./.github/workflows/_slack-run-report.yml — now uses proper workflow_call with secrets: inherit.

3 new workflows:

  1. stale-branch-cleanup.yml — Weekly Monday cron. Finds branches merged into main with no activity >14 days and no open PR. Deletes them and posts summary to Slack (if SLACK_WEBHOOK_URL secret exists).

  2. health-monitor.yml — Every 30 min. Checks bridge.a-to-mind.com/health, /api/stack, apex SPA, and backend /api/health. Posts to Slack on state change (degraded).

  3. pr-labeler.yml — On PR open/sync. Auto-labels PRs by size (size/XS through size/XL) and scope (scope/bridge, scope/backend, scope/frontend, scope/packages, scope/ci, scope/infra).

All workflows gracefully degrade when secrets aren't configured — they skip Slack steps rather than failing.

Link to Devin session: https://app.devin.ai/sessions/c3055826a7da441aadedfe5a600d30d5
Requested by: @atomeam

Fixes:
- Fix vitest watch mode hang in CI: governance, throttle, notion-worker
  now use 'vitest run' instead of 'vitest' (which starts watch mode)
- Fix Slack RUN reporter: broken multiline string, missing JSON escaping,
  proper workflow_call reference in smoke test

New workflows:
- stale-branch-cleanup.yml: weekly cron deletes merged branches >14 days
  old with no open PR, posts summary to Slack
- health-monitor.yml: every 30 min checks bridge.a-to-mind.com/health,
  /api/stack, apex SPA, backend /api/health — alerts Slack on failures
- pr-labeler.yml: auto-labels PRs by size (XS/S/M/L/XL) and scope
  (bridge, backend, frontend, packages, ci, infra)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aether-backend Ready Ready Preview, Comment Jun 12, 2026 3:52am
aether-production Ready Ready Preview, Comment Jun 12, 2026 3:52am

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
loxa 6dadf1c Jun 12 2026, 03:51 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
aether 6dadf1c Jun 12 2026, 03:51 AM

atomeam and others added 3 commits June 12, 2026 03:48
… type errors

Previously, 32 packages had TypeScript source but no typecheck/build
scripts, meaning turbo never typechecked them. Adding scripts exposed
18 pre-existing type errors across 16 packages.

Root causes fixed:
- lessons: readLessons returned array instead of Promise (missing Promise.resolve)
- curator-audit: same Promise issue + string|undefined assignment
- mcp-tools: child_process.exec used as exec.exec (wrong import destructure)
- workflow: EXAMPLE_WORKFLOWS missing required timeout/on_failure fields
- human-queue: resolve() returned partial object instead of full QueueItem
- operations: TaskQueue extends EventEmitter but missing super() call
- sandbox: string|undefined assigned to string (added nullish coalescing)
- profile: imported nonexistent getLearnedPatterns (removed unused import)
- telemetry: same getLearnedPatterns reference (changed to getPatternConfidences)
- convene: createdAt/resolvedAt used bare 'number' instead of z.number(),
  castVote returned wrong type (Omit instead of full ParticipantVote)
- metrics: missing tsconfig.json entirely
- github-automation: missing tsconfig.json entirely

Result: 56/56 packages now typecheck clean (was 19/19 before).
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…r upgrade

New workflows:
- revenue-velocity-monitor.yml: 6-hour Stripe charge check, alerts on
  high-value charges, posts to Slack, logs to Notion via bridge webhook
- client-sentiment-feedback.yml: keyword-based sentiment analysis on
  support messages (via repository_dispatch or manual trigger), routes
  P0/P1 to Slack #ops-runs with severity classification
- dependency-audit.yml: weekly npm audit + outdated check, alerts on
  critical/high vulnerabilities

Improvements:
- deploy-worker.yml: upgraded from bridge-only to matrix strategy
  deploying all 5 Cloudflare workers (bridge, aether-verifier,
  notion-worker, weekly-digest, homebase) with change detection
- backend/package.json: added test script (vitest run) — unlocks
  60 tests (3 test files) that were previously never run in CI

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant