Skip to content

Manage Voice credentials and rotate the local bridge key atomically - #1532

Merged
vibeforge1111 merged 12 commits into
masterfrom
agent/alchemistab/r30-managed-secret-runtime
Aug 8, 2026
Merged

Manage Voice credentials and rotate the local bridge key atomically#1532
vibeforge1111 merged 12 commits into
masterfrom
agent/alchemistab/r30-managed-secret-runtime

Conversation

@vibeforge1111

@vibeforge1111 vibeforge1111 commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Manage Voice credentials and rotate the local bridge key atomically

What this changes

  • Migrates the dedicated OpenAI Voice credential into voice.openai.api_key and injects the selected Voice provider only across the authorized Telegram → Builder → canonical Voice owner boundary.
  • Adds managed local secret spark.bridge_api_key plus a non-argv --generate rotation path.
  • Removes bridge material from Spark-generated env files and injects it only into Spawner and Telegram child processes.
  • Serializes staging, process snapshot, stop, backend promotion, legacy scrub, pending cleanup, restart, and rollback under one rotation lock.
  • Preserves the exact pre-rotation consumer set, blocks mixed key generations, physically purges superseded backend copies, and restores the original backend on rollback.
  • Makes normal stop/start lifecycle operations share the rotation authority so stop intent cannot be lost during the empty-registry window.
  • Rejects key reuse against managed secrets, named Telegram profiles, provider/password/credential/authorization variables, and manifest-declared nonstandard secret bindings.
  • Keeps hosted Railway/container environments platform-authoritative and avoids persisting hosted bridge material locally.
  • Keeps bridge rotation success output fully constant so no secret-derived value or backend-return data reaches the logging sink.
  • Advances the R30 registry and merged-source truth to the exact immutable merge identities for Voice, Builder, Spawner, and Telegram.

Exact integration identity

  • Base: a53e376e11481f33e4fbddb441b5c6a15ea84196
  • Candidate: 20eca9584d04bf4a7e866774c13ff3264a5de107
  • Commits: 12
  • Scope: 11 files, +1,900 / -162; most growth is isolated runtime authority and focused regression coverage rather than the CLI god file.
  • Public attribution: the ten rewritten implementation commits retain GitHub noreply author/committer metadata plus parseable Agent-Id and Original-Commit trailers; both registry follow-up commits use GitHub noreply metadata and a parseable Agent-Id.

Proof

  • Focused CLI/bridge/runtime suite: 927 passed, 2 skipped, 419 subtests.
  • Hermetic full CLI suite: 1,502 passed, 2 skipped, 1,163 subtests.
  • R30 merged-source truth tests: 3 passed.
  • Registry pin verification: passed with 0 unverified; all four new owner tags peel to their exact merge commits.
  • R-21 line-count gate: passed; cli.py remains at or below its 21,629-line baseline and tests/test_cli.py remains below baseline.
  • Release-policy binding and gate/evidence separation: passed.
  • New-file Ruff checks: passed.
  • Direct dependency audit: no known vulnerabilities.
  • Diff whitespace, Git object integrity, backend-switch, interruption, collision, stop-intent, rollback-containment, and privacy checks: passed.
  • Fresh installable-artifact proof: the exact candidate was archived, installed through scripts/install.sh into a disposable isolated prefix, executed successfully, and verified all registry pins with 0 unverified.
  • Exact-head GitHub checks passed: test-and-audit, secret-scan, Python 3.11/3.12/3.13 browser-use compatibility, CodeQL, and Scorecard.
  • Independent final implementation review: clean.
  • The initial non-hermetic full run reproduced two live-Spark-home contamination failures; the exact tests and entire suite passed under an isolated SPARK_HOME, which is the intended test boundary.

Owner and supervised integration proof

The operator explicitly accepted proceeding without credential rotation. This PR makes no rotation-remediation or hosted-provider-success claim, and never places credential values in generated config, the PR, or logs.

Rollback

Revert the twelve commits. The source patch performs no automatic rotation during install. A runtime rotation failure restores the prior backend and consumer set when it can prove that state; otherwise it leaves consumers stopped or reports state uncertainty instead of claiming success. Registry rollback returns Voice, Builder, Spawner, and Telegram to their prior exact commits and refs; no database or points state changes.

Agent-Id: alchemistab
Original-Commit: 5c1bb03285bfff9f2c5cf4f405d05a90a5632baf
Agent-Id: alchemistab
Original-Commit: a900ab26eb248d6e12383b33e50d7204eb7f2fa3
Keep bridge rotation and voice secret routing out of the CLI god file while closing hosted authority, readiness scoping, rollback, collision, interrupt, and revoke-all gaps.

Agent-Id: alchemistab
Original-Commit: dfba5957cc070de50638b5fe33059ed38a95d90e
Keep staging, promotion, rollback, backend cleanup, and consumer lifecycle changes under one lock. Make stop wait before reading PID state and expand collision and interruption coverage.

Agent-Id: alchemistab
Original-Commit: 3813c8979f6ca08e45e06a5002a8011e29b48f28
Permit owner-approved file storage without an installed keyring while failing closed when an indexed keychain cannot be inspected. Keep the stop wrapper readable without growing the R-21 baseline.

Agent-Id: alchemistab
Original-Commit: 01ee1d1b12012469566374a1415849562b712980
Snapshot the indexed backend through the fail-closed reader, classify generated and manifest-declared secret bindings comprehensively, and keep consumers stopped when rollback authority is uncertain.

Agent-Id: alchemistab
Original-Commit: a968e0a3f5549e8c970a0780cccfe863827d71e9
Clean staged material before restoring processes, stop partial restart sets, verify tracked PIDs are gone, and report uncertainty instead of claiming containment when stop proof fails.

Agent-Id: alchemistab
Original-Commit: 99b4927e57d826dfb6c2334e67e16d942a20d735
Distinguish an unchanged original consumer set from deliberately stopped and uncertain rollback states.

Agent-Id: alchemistab
Original-Commit: 9368b0dc1e5736864992138e418c2d12e83b28f5
Comment thread src/spark_cli/cli.py Fixed
@vibeforge1111
vibeforge1111 marked this pull request as ready for review August 8, 2026 14:13
@cursor

cursor Bot commented Aug 8, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vibeforge1111
vibeforge1111 merged commit 045ddd5 into master Aug 8, 2026
8 checks passed
@vibeforge1111
vibeforge1111 deleted the agent/alchemistab/r30-managed-secret-runtime branch August 8, 2026 14:13
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