fix(photon): unify dashboard/Spectrum project ids and simplify provisioning - #46859
Closed
underthestars-zhy wants to merge 1 commit into
Closed
fix(photon): unify dashboard/Spectrum project ids and simplify provisioning#46859underthestars-zhy wants to merge 1 commit into
underthestars-zhy wants to merge 1 commit into
Conversation
…pectrum provisioning Co-Authored-By: Marvin <marvin@photon.codes> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
underthestars-zhy
force-pushed
the
ryan/photon-fix
branch
from
June 15, 2026 20:26
44c505c to
48b0c45
Compare
|
Is there an update on this? |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The Photon dashboard used to expose two identifiers per project: the Dashboard
id(used in management API paths) and a separatespectrumProjectId(what thespectrum-tsSDK authenticates with), populated only after Spectrum was enabled on the project. The setup flow therefore had to enable Spectrum, poll for the freshly-mintedspectrumProjectId, and carry both ids around.The dashboard has since unified the two (dashboard ENG-1582):
project.id == spectrumProjectIdfor every project, pre-existing diverged rows were backfilled, and Spectrum is always provisioned at create-time — so there is no enable/toggle step and no second id anymore.This PR brings the Photon plugin in line with that change: it drops the enable-Spectrum dance, removes the now-dead
spectrumProjectIdplumbing, stops sending the retiredspectrum: truecreate flag, and rewrites the docs/comments to describe the single unified id. Behavior for end users is unchanged (PHOTON_PROJECT_IDstill holds the right id) — the setup flow is just simpler and no longer depends on API surface the dashboard removed.Related Issue
Follow-up to the Photon Spectrum work in #42444 / #44486 (both merged). No separate tracking issue.
Type of Change
Changes Made
auth.pyensure_spectrum_enabled()andget_project()— there is no enable/toggle step and nospectrumProjectIdto re-fetch.create_project()no longer sends the retiredspectrum: trueflag in the POST body.load_dashboard_project_id()now prefers the storedspectrum_project_id: for pre-backfill installs the olddashboard_project_idis the diverged id that the unification rewrote (it now 404s), while the Spectrum id always matches the live row. Legacy keys remain as fallbacks.print_credential_summary()/credential_summary()surface a singleproject_idinstead of separatedashboard_project_id+spectrum_project_id.cli.pysetupstep 3 no longer enables Spectrum or polls forspectrumProjectId; it reuses the dashboard id as the Spectrum id, rotates the secret, and persists creds. Status text updated (Provisioning Spectrum credentials…/Spectrum ready).README.md(plugin)auth.jsonexample, and the "Note on ids" callout updated to reflect that the dashboard id is the Spectrum project id.Tests (
tests/plugins/platforms/photon/test_auth.py)test_create_project_sends_spectrum_true→test_create_project_omits_spectrum_flag(asserts the flag is not sent).load_dashboard_project_idround-trip now asserts it resolves to the Spectrum id.credential_summarytest asserts the singleproject_idfield.ensure_spectrum_enabledtoggle tests (function deleted).How to Test
setupon a fresh project → the secret is provisioned andPHOTON_PROJECT_IDis persisted; no enable/toggle round-trip.hermes photon statusprints oneproject idline.spectrum-tswith the unified id and the agent replies.Automated:
pytest tests/plugins/platforms/photon/test_auth.py -q # 32 passedChecklist
Code
fix(scope):, etc.)main; a single commit, no already-merged work)Documentation & Housekeeping
plugin.yamlif I added/changed config keys — N/A (no config keys changed)Screenshots / Logs