Editor · blackroad-router · feat/lanes-v2
Workspace
Active repo: blackroad-router. 4 files changed on this branch, tests passing 142/218, one deploy waiting on your approval.
Branch
feat/lanes-v2
6 commits ahead
Tests
142 / 218
passing
Build
a1f3c92
14 min ago · 11 s
Deploys today
6 / 7
1 pending
Env vars
12 / 13
1 missing
Files 4 changed
src/lanes
router.tsM +42 −18
resolve.tsM +12 −4
consent.ts+86 NEW
tests/lanes
router.test.tsM +24 −2
src/lanes (clean)
index.ts·
types.ts·
root
package.json·
tsconfig.json·
README.md·
router.ts×
resolve.ts
consent.ts×
router.test.ts
14// route a query into one or more of the 17,290 lanes
15export async function routeQuery(q: Query): Promise<RouteResult> {
16 const consent = await getConsent(q.sessionId);
16 const consent = await resolveConsent(q.sessionId, q.lanes);
17 if (!consent.allowed) return { routes: [], reason: "consent-denied" };
18
19 const candidates = selectLanes(q.text, q.hints);
20 const scored = scoreLanes(candidates, q.recency);
21 // receipt the routing decision before returning
22 await writeReceipt("query_routed", { q, scored });
23 return { routes: topN(scored, 4) };
24}
src/lanes/router.ts
·
TYPESCRIPT
·
LN 22 : 38
·
UTF-8
·
LF
·
UNSAVED · +42 −18
Tests · last run 11s
router · selectLanes14 ok
router · scoreLanes8 ok
router · topN4 ok
consent · resolveConsent2 of 3 · new
resolve · happy path6 ok
resolve · timeout retryflaky · skip
e2e · query → receipt12 ok · 1.4s
Lint & types
eslint0 errors
tsc · strict1 warning
prettierclean
Deploys · today6 succeeded · 1 awaiting
roadview · edge-01
sha a1f3c92 · 14 min ago
AWAITING APPROVAL
canon-os · vps-01
sha 7f1a9b3 · 50 min ago
LIVE · 99.9% uptime
roadbook · cf pages
sha 2e9d4a6 · 1.5h ago
LIVE
api · v0.4.2
sha 9c3fb71 · 3h ago
ROLLED BACK → v0.4.1