Skip to content

fix(photon): unify dashboard/Spectrum project ids and simplify provisioning - #46907

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-e1038318
Jun 16, 2026
Merged

fix(photon): unify dashboard/Spectrum project ids and simplify provisioning#46907
teknium1 merged 1 commit into
mainfrom
hermes/hermes-e1038318

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvage of #46859 by @underthestars-zhy, cherry-picked onto current main with authorship preserved.

Summary

Brings the Photon iMessage plugin in line with the dashboard's id unification (ENG-1582): project.id == spectrumProjectId for every project, Spectrum is provisioned at create-time, and the enable/toggle step no longer exists. Setup is simpler; end-user behavior is unchanged (PHOTON_PROJECT_ID still holds the right id).

Changes (photon plugin only)

  • auth.py: drop ensure_spectrum_enabled() + get_project() (only ever called each other), stop sending the retired spectrum: true create flag, load_dashboard_project_id() now prefers the stored spectrum id (pre-backfill diverged dashboard ids now 404), single project_id in credential summaries, docstrings rewritten.
  • cli.py: setup step 3 no longer enables Spectrum or polls for spectrumProjectId; it reuses the dashboard id directly and rotates the secret.
  • README.md: setup steps, env-var docs, and the "Note on ids" callout updated for the single unified id.
  • tests: ..._sends_spectrum_true..._omits_spectrum_flag, round-trip + credential-summary tests updated, the two toggle tests removed.

Validation

Before After
photon plugin tests 88/88 pass
core files touched none (plugin-only)

Infographic

photon-one-id

…pectrum provisioning

Co-Authored-By: Marvin <marvin@photon.codes>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-e1038318 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 10962 on HEAD, 10960 on base (🆕 +2)

🆕 New issues (2):

Rule Count
unresolved-attribute 2
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
run_agent.py:2920: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`

✅ Fixed issues (1):

Rule Count
invalid-assignment 1
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`

Unchanged: 5771 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins labels Jun 15, 2026
@doronkatz

Copy link
Copy Markdown

Looking forward to this being merged

@teknium1
teknium1 merged commit 5b3fa26 into main Jun 16, 2026
35 checks passed
@teknium1
teknium1 deleted the hermes/hermes-e1038318 branch June 16, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants