fix(photon): unify dashboard/Spectrum project ids and simplify provisioning - #46907
Merged
Conversation
…pectrum provisioning Co-Authored-By: Marvin <marvin@photon.codes> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
🔎 Lint report:
|
| 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.
|
Looking forward to this being merged |
14 tasks
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.
Salvage of #46859 by @underthestars-zhy, cherry-picked onto current
mainwith authorship preserved.Summary
Brings the Photon iMessage plugin in line with the dashboard's id unification (ENG-1582):
project.id == spectrumProjectIdfor 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_IDstill holds the right id).Changes (photon plugin only)
auth.py: dropensure_spectrum_enabled()+get_project()(only ever called each other), stop sending the retiredspectrum: truecreate flag,load_dashboard_project_id()now prefers the stored spectrum id (pre-backfill diverged dashboard ids now 404), singleproject_idin credential summaries, docstrings rewritten.cli.py: setup step 3 no longer enables Spectrum or polls forspectrumProjectId; 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...._sends_spectrum_true→..._omits_spectrum_flag, round-trip + credential-summary tests updated, the two toggle tests removed.Validation
Infographic