Operational knowledge for agents working on this Deno-based queue service.
- Runtime: Deno 2.7.6 (upgraded via PR #3)
- Main components: Queue FIFO data structure, QueueManager, HTTP handler with bearer token auth, persistence layer
Main branch requires Deno 2.7.6
The .circleci/config.yml must match the Deno version:
docker:
- image: denoland/deno:2.7.6If you upgrade Deno, ALWAYS update this image or CI will fail.
Deno 2.x uses JSR format:
Correct: import { parseArgs } from "jsr:@std/cli/parse-args";
Old (broken): import { parse } from "https://deno.land/std@0.119.0/flags/mod.ts";
URLPatternrouting APIDeno.serve()native HTTP server
Do NOT use these in code that must support Deno 1.x.
The clear() method creates the file if absent:
Deno.writeFileSync(this.directory + "persist.dat", new Uint8Array());This prevents "file not found" errors in tests.
PR #2 (Bearer Token Auth) depends on PR #3 (Deno 2.x). Merge order: PR #3 first, then PR #2.
Test off-by-one errors, FIFO order, operator mutations, and boundary conditions explicitly.
Test HTTP handler behaviour with real requests, not internal implementation details.
CircleCI fails? Check: (1) CircleCI Deno version matches code (2) Import format (jsr: vs deno.land) (3) Using Deno 2.x-only APIs
Merge blocked? gh api repos/jonbaldie/queue/branches/main/protection --jq '.enforce_admins.enabled' — if true, disable with DELETE before merging with --admin
Critical: If the CI fails in remote after your push, then you MUST follow-up even if the cause seems pre-existing.
- Use red/green TDD.
- Actually run the code, automated tests by themselves aren't sufficient.
- Use 'tracer bullets', aka canary tests, aka smoke tests, aka E2E tests.
- Actively look for genuine bugs, edge cases, failure modes - if you find these, then you've succeeded, not failed.
- No mocks, ever. They're a common escape hatch for writing tautological or pat-self-on-back tests.
This project uses bd (beads) for issue tracking. Run bd prime to see full workflow context and commands.
bd ready # Find available work
bd show <id> # View issue details
bd update <id> --claim # Claim work
bd close <id> # Complete work- Use
bdfor ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists - Run
bd primefor detailed command reference and session close protocol - Use
bd rememberfor persistent knowledge — do NOT use MEMORY.md files
When ending a work session, you MUST complete ALL steps below. Work is NOT complete until git push succeeds.
MANDATORY WORKFLOW:
- File issues for remaining work - Create issues for anything that needs follow-up
- Run quality gates (if code changed) - Tests, linters, builds
- Update issue status - Close finished work, update in-progress items
- PUSH TO REMOTE - This is MANDATORY:
git pull --rebase bd dolt push git push git status # MUST show "up to date with origin" - Clean up - Clear stashes, prune remote branches
- Verify - All changes committed AND pushed
- Hand off - Provide context for next session
CRITICAL RULES:
- Work is NOT complete until
git pushsucceeds - NEVER stop before pushing - that leaves work stranded locally
- NEVER say "ready to push when you are" - YOU must push
- If push fails, resolve and retry until it succeeds