chore: add AGENTS.md, extract ALLOWED_ORIGINS, wire e2e config, add inline comments - #1
Open
liorsbg wants to merge 1 commit into
Open
chore: add AGENTS.md, extract ALLOWED_ORIGINS, wire e2e config, add inline comments#1liorsbg wants to merge 1 commit into
liorsbg wants to merge 1 commit into
Conversation
…nline comments - Add AGENTS.md with architecture decisions, testing conventions, code style rules, and a 'do not do' list for agents working in this repo - Add AGENTS-IMPROVEMENT-SPEC.md recording the audit findings and rationale - Extract ALLOWED_ORIGINS to src/cors.ts; remove duplicate definitions from server.ts and lobby.ts - Add comment to RemoteStorage.listMatches explaining the intentional [] return - Add comment to the SimpleQueue in match-room.ts explaining why p-queue cannot be used in the Miniflare Workers environment - Wire vitest.e2e.config.ts into pnpm e2e:local, replacing the curl-based scripts/e2e-local.mjs runner Co-authored-by: Ona <no-reply@ona.com>
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.
What
Adds agent guidance and applies four code improvements identified during an AGENTS.md audit.
Changes
New files
AGENTS.md— agent guidance covering architecture decisions, testing conventions, code style rules, boardgame.io import paths, and a "do not do" list. Includes non-obvious constraints like thep-queuefootgun, the intentionalRemoteStorage.listMatches[]return, and the dualALLOWED_ORIGINSarrays.AGENTS-IMPROVEMENT-SPEC.md— audit record: what was good, what was missing, what was wrong, and the prioritised list of remaining work.Code changes
src/cors.ts— new sharedALLOWED_ORIGINSconstant. Removes the duplicate definitions that existed independently inserver.tsandlobby.ts.src/remote-storage.ts— comment onlistMatchesexplaining the intentional[]return (lobby DO owns the match list).src/match-room.ts— comment onSimpleQueueexplaining whyp-queuecannot be used in the Miniflare Workers environment.package.json—pnpm e2e:localnow runsvitest run --config vitest.e2e.config.tsinstead of the legacy curl-basedscripts/e2e-local.mjs. The E2E test files already manage the dev server lifecycle internally.Verification