fix(b-18): writer-env-fix uses Project-Access-Token (PAT) instead of Bearer#159
Merged
Conversation
…Bearer
All ACC1..7 tokens in this repo are project-scoped (PAT), not account/team.
Verified by token-classify.yml run 25846091578 (2026-05-14 06:43Z) — every
token responds successfully to 'Project-Access-Token: <T>' header with
'{ projectToken { project { id name } } }' query, and returns 'Not Authorized'
to 'Authorization: Bearer <T>'.
Closes #158 (misdiagnosed as token-expiry; was actually wrong auth mode).
Refs: refresh-acc47.yml (proven-working PAT pattern, run 25754312720).
Refs: crates/trios-railway-core/src/transport.rs AuthMode::Project.
Anchor: phi^2 + phi^-2 = 3
This was referenced May 14, 2026
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.
B-18 · writer-env-fix.yml uses wrong auth mode for Railway PAT tokens
Diagnosis (R5-verified)
token-classify.yml run 25846091578 (2026-05-14 06:43 UTC) proved that ALL 7
RAILWAY_TOKEN_ACC1..7secrets are project-access-tokens (PAT), not account/team tokens:(
Bearer/me→ "Not Authorized" — expected behaviour for PAT.)Root cause
writer-env-fix.ymlsendsAuthorization: Bearer <token>with{ projects { edges } }query — this combination requires an account/team token, returnsdata.projects.edges = nullfor PAT, sanity-check exits with code 3.Why this PR
Aligns
writer-env-fix.ymlwith the proven-working pattern fromrefresh-acc47.yml(last successful run 25754312720, 2026-05-12 18:31 UTC):Also references
crates/trios-railway-core/src/transport.rs:Change scope (6 replacements)
Sanity-check tokensstep — uses PAT header +projectTokenqueryresolve_env()helper — PAT headerfetch_services()helper — PAT headerupsert_var()helper — PAT headerredeploy()helper — PAT headerenv.RAILWAY_TOKEN_AUTH: team→project(with R5 comment)Verification plan (post-merge)
gh workflow run writer-env-fix.yml --repo gHashTag/trios-railway -f confirm=PHI gh run watch # expect "token ACC1 OK (PAT scope) / token ACC2 OK (PAT scope)"Then within T+15min:
Why this matters
Writer service
ssot.bpb_samplesis dead since2026-05-13T19:26:40Z(~10h 53m at time of writing). Doctor Layer-2 (PR #155) still draft. This fix is the last operator-mergeable unblock before the hive can self-heal.Refs
crates/trios-railway-core/src/transport.rs—AuthMode::Projectsource of truthAnchor:
φ² + φ⁻² = 3 · TRINITY · NEVER STOP · DOI 10.5281/zenodo.19227877