Skip to content

feat(session-guard): write-coordination lock + git hooks; green CI install/gitleaks; drop vestigial NEON_SECRET#217

Open
HeadyMe wants to merge 6 commits into
rebuildfrom
feat/session-guard
Open

feat(session-guard): write-coordination lock + git hooks; green CI install/gitleaks; drop vestigial NEON_SECRET#217
HeadyMe wants to merge 6 commits into
rebuildfrom
feat/session-guard

Conversation

@HeadyMe

@HeadyMe HeadyMe commented Jun 18, 2026

Copy link
Copy Markdown
Member

Why

Multiple autonomous writers on the dev box (cron auto-commit-push.sh every 5min, the in-folder watcher, the Antigravity IDE agent) commit as the same git identity and race active edits — interleaved commits, mid-session reverts. You couldn't tell what to pause. This makes the problem structurally impossible to repeat.

What

  • @heady/session-guard — machine-wide advisory lock (~/.heady/session.lock, heartbeat + TTL) every local writer consults. CLI: acquire/heartbeat/release/status/check/pause/resume. Stale locks auto-expire (no deadlock); corrupt lock fails open. 8 tests.
  • Git hooks (tooling/hooks/{pre-commit,pre-push} via core.hooksPath) — block a commit/push when a different session holds a fresh lock. --no-verify is the emergency valve.
  • Legacy auto-commit-push.sh patched to honor the lock + a one-switch pause flag (~/.heady/autonomy.paused).
  • Runbook + full autonomous-writer inventory: tooling/session-guard/README.md.

CI / cleanup riders

  • gitleaks license gate → job-level env + if: env.GITLEAKS_LICENSE != '' (the secrets context isn't readable in a step-level if:).
  • pnpm-lock.yaml synced (midi-bus/session-guard/heady-derive/report-templates importers) — frozen-lockfile was broken by an unsynced midi-bus add; CI install step now passes.
  • Removed NEON_SECRET — 0 code refs, duplicate of the real NEON_API_KEY; regenerated HEADY_VARIABLE_REGISTRY.md.

Verified locally: coherence exit 0 · secrets + session-guard tests pass · turbo 68/68 · frozen-lockfile OK.

⚠️ CI may not auto-run (workflows currently only trigger on Dependabot events — see report). This PR is also the clean alternative to direct-pushing rebuild.

🤖 Generated with Claude Code

HeadyConnection and others added 6 commits June 18, 2026 04:06
…ll/gitleaks; drop vestigial NEON_SECRET

SESSION-GUARD (new @heady/session-guard): a machine-wide advisory lock (~/.heady/session.lock, heartbeat+TTL) so the multiple autonomous writers on this box (cron auto-commit-push every 5min, the in-folder watcher, the Antigravity IDE agent) never race active edits. Enforced at the git layer via tooling/hooks/{pre-commit,pre-push} (core.hooksPath). CLI: acquire/heartbeat/release/status/check/pause/resume. Stale locks auto-expire (no deadlock); corrupt lock fails open. Legacy scripts/auto-commit-push.sh patched to honor the lock + ~/.heady/autonomy.paused. 8 tests. Runbook + writer inventory in tooling/session-guard/README.md.

CI: gitleaks license gate now uses job-level env mapping + 'if: env.GITLEAKS_LICENSE != ""' (secrets context isn't readable in a step-level if). pnpm-lock.yaml synced to include midi-bus/session-guard/heady-derive/report-templates importers (frozen-lockfile was broken by an unsynced midi-bus add → CI install step now passes).

SECRETS: removed NEON_SECRET — 0 code references, a duplicate of the real NEON_API_KEY (used by src/services/neon-db.js); sharpened NEON_API_KEY description. Removed from registry + .env.example; regenerated HEADY_VARIABLE_REGISTRY.md. coherence exit 0, secrets+session-guard tests pass, turbo 68/68.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… UDP-MIDI transport

- Engaged CSL dual-gate for active negative pattern blocking
- Built steganography-packer.mjs for variable bit/nibble slicing via Fibonacci key
- Bridged system.consequence.enforce NATS events to UDP RTP-MIDI (CC 104)
- Added ADR-0028 and ADR-0029 documenting these shifts
- Introduced heady-adr-postmortem agent skill for automated post-build reports
- Updated facts.yaml concepts index
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants