Validate tokens and port at startup, test the HTTP server #58
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-reconcile-trigger#58
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
What
loadConfigaccepts any token, repeated tokens and a non-numeric port.parseTokenssilently skips a pair it cannot parse.createServerhas no test.Why
The shim is a network endpoint and the bearer token is its only gate.
Failing case
RECONCILE_SHIM_TOKENS=a=xstarts and acceptsBearer x.forgejo-repo:abcis dropped with no log. A refactor that writes the sentinel before the auth check keeps all 20 tests green.Fix
Throw on tokens under 32 chars, duplicate tokens, unparseable non-empty pairs and an invalid port. Add
src/server.test.ts: 401 writes nothing, 204 writes the file, unwritable path gives 500,GET /healthzgives 200.Done when
pnpm testpasses