Skip to content

Consolidate Go gateway and update project documentation - #147

Merged
AnkanMisra merged 7 commits into
mainfrom
t3code/353189b1
May 12, 2026
Merged

AnkanMisra merged 7 commits into
mainfrom
t3code/353189b1

Conversation

@AnkanMisra

@AnkanMisra AnkanMisra commented May 12, 2026 •

Copy link
Copy Markdown
Owner

View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

Summary by CodeRabbit

  • Removed Features
    • AI text endpoints, payment verification, and related middleware/configuration removed.
  • Infrastructure
    • Node/Express server bootstrap and Docker image removed; runtime dependencies trimmed.
  • CI
    • E2E workflow triggers updated so changes confined to core source files no longer run E2E by default.
  • Documentation
    • README, web README, AGENTS.md, and RULES.md updated with architecture, wallet guidance, and review rules.

AnkanMisra and others added 3 commits May 12, 2026 21:08
The src/ tree was the pre-migration Express/Bun monolith and was
still wired in three places: package.json scripts (start/dev), the
root Dockerfile, and the e2e workflow path filter. `bun run start`
and `docker build .` would launch the old app on port 3000, shadowing
the Go gateway and contradicting the polyglot architecture documented
in the README.

- Delete src/ (Express routes, x402 middleware, ai/payment services)
- Delete root Dockerfile (CMD pointed at src/index.ts)
- Drop express, cors, uuid and matching @types from package.json
- Drop dead start/dev/agent/dev:all scripts; keep stack and tests
- Mark package as private (not publishable)
- Regenerate bun.lock (6 packages removed)
- Remove src/** from .github/workflows/e2e.yml path filter

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- README: replace the false `httputil.ReverseProxy` claim with an
  accurate description of the gateway's verify-then-proxy flow.
- README: relabel the architecture diagram's "Receipt Store" as
  "In-memory Receipt Map" so the diagram matches the implementation
  (gateway/main.go:779). Drop the "Persistence" alias since one of
  the two boxes (Redis) is the only persistent member.
- README: add a Limitations & What's Next section documenting the
  in-memory receipt store, lack of on-chain settlement check, single
  -chain hardcoding, replay-window choice, per-process rate limiter,
  hardcoded CORS, and free-model demo tradeoff.
- README: add CI badges (go-tests, rust-tests, web-build, e2e, MIT)
  and a one-line provenance note about the open-source contributors.
- web/README: drop Phantom (Solana wallet, irrelevant on EVM) and
  update the Next.js version from 14 to 16 to match the actual deps.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
These three comments were leftover scratch labels from an AI-assisted
work session. They tagged code with "VIBE FIX:" or "CORRECT:" prefixes
that explained nothing about WHY the code is structured the way it is.

Rewritten:

- gateway/main.go middleware-registration site now states the real
  invariant (Correlation IDs must be assigned before any later
  middleware can reject the request, so all errors stay traceable).
- gateway/main.go verifier-call site: the comment said what the
  code does; deleted, the line is self-evident.
- gateway/middleware.go context-set site now explains the Go
  convention for typed context keys (collision avoidance), which is
  the actual non-obvious reason that line exists.

No behavior change. \`go build ./...\` clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@AnkanMisra

Copy link
Copy Markdown
Owner Author

@codex review

@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR removes the Node.js/Express TypeScript server (configs, middleware, services, routes, Dockerfile), trims Node dependencies, updates E2E GitHub Actions path triggers to exclude src/**, and adds documentation and small comment clarifications in the Go gateway.

Changes

Node.js / Express TypeScript server removal

Layer / File(s) Summary
Config and business services
src/config.ts, src/services/payment.ts, src/services/ai.ts
Deleted exported CONFIG initialization and business logic: payment verification (EIP‑712, nonce store, PaymentService), and AI wrappers (AIService) for OpenRouter chat completions.
Request middleware
src/middleware/correlation.ts, src/middleware/x402.ts
Removed correlation ID middleware (and Express Request augmentation) and x402 payment-signature middleware (and Request.userWallet augmentation) including signature/nonce/timestamp parsing and PaymentService calls.
Routes and server bootstrap
src/routes/ai.ts, src/index.ts
Removed Express router endpoints (/summarize, /sentiment), /health endpoint, middleware wiring (CORS/JSON/correlation/x402), and server listen/start logic.
Runtime/deps and container
Dockerfile, package.json
Removed Bun-based Dockerfile contents; trimmed dependencies to only ethers, removed cors, express, uuid and corresponding @types/* devDependencies.

Documentation, CI workflow, and gateway comment updates

Layer / File(s) Summary
E2E workflow triggers
.github/workflows/e2e.yml
Removed src/** from paths filters on both pull_request and push, so edits under src/** no longer trigger the E2E workflow.
Gateway comments and context key docs
gateway/main.go, gateway/middleware.go
Small comment clarifications: note CorrelationID middleware is registered first so all requests (including rejected ones) carry a correlation ID; document use of a typed context key to avoid context collisions. No behavioral change.
Repository docs and playbooks
README.md, web/README.md, AGENTS.md, RULES.md
Docs updates: header badges and open-source note; mermaid diagram storage node renamed to “In-memory Receipt Map”; gateway internals and limitations text revised; web README updated wallet targets and Next.js version; AGENTS.md and RULES.md expanded with review/playbook and AI review expectations.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • AnkanMisra/MicroAI-Paygate#3: Adds or previously modified the repository E2E GitHub Actions workflow related to the workflow this PR changes.
  • AnkanMisra/MicroAI-Paygate#12: Modifies config and payment/nonce verification logic; related to the removed src/config.ts and payment service in this PR.
  • AnkanMisra/MicroAI-Paygate#82: Also adjusts the CI workflow path-based triggers; directly related to .github/workflows/e2e.yml changes.

Suggested labels

documentation, Medium

Poem

🐇
I hopped through lines both old and new,
Removed the routes, trimmed dependencies too,
Docs polished bright, CI paths pruned clean,
Correlation whispers stay unseen,
A tidy patch — a rabbit’s nimble routine.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Consolidate Go gateway and update project documentation' accurately reflects the main changes: removing the Node/Express/Bun server stack and related src files, while expanding gateway documentation and review guidelines (AGENTS.md, RULES.md, README.md updates).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/353189b1

Warning

Review ran into problems

🔥 Problems

Timed out fetching pipeline failures after 30000ms

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
README.md (1)

192-204: 💤 Low value

Excellent transparency in documenting limitations.

This section is exceptionally well-written and demonstrates professional honesty about the system's current constraints. Each limitation is concrete, actionable, and explains the trade-offs clearly.

Minor suggestion: Consider moving the note about paused PR reviews (line 204) to a pinned GitHub issue or CONTRIBUTING.md, as it's temporal information that may become stale in the main README.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 192 - 204, Remove the temporal note "PR reviews are
paused for the current placement season and will resume after" from the
README.md limitations section and instead add it to a CONTRIBUTING.md entry or
create a pinned GitHub Issue/Notice that tracks the pause (include the same text
and any expected resume date or maintenance contact). Update README.md to
reference CONTRIBUTING.md or the pinned issue for contributor status info (e.g.,
"See CONTRIBUTING.md or pinned issue for current PR review status") so the main
README remains evergreen.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@README.md`:
- Around line 192-204: Remove the temporal note "PR reviews are paused for the
current placement season and will resume after" from the README.md limitations
section and instead add it to a CONTRIBUTING.md entry or create a pinned GitHub
Issue/Notice that tracks the pause (include the same text and any expected
resume date or maintenance contact). Update README.md to reference
CONTRIBUTING.md or the pinned issue for contributor status info (e.g., "See
CONTRIBUTING.md or pinned issue for current PR review status") so the main
README remains evergreen.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: acb800dd-7a42-4d34-8523-edc8110c2d7b

📥 Commits

Reviewing files that changed from the base of the PR and between 36ccc57 and f1a60b6.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (14)
  • .github/workflows/e2e.yml
  • Dockerfile
  • README.md
  • gateway/main.go
  • gateway/middleware.go
  • package.json
  • src/config.ts
  • src/index.ts
  • src/middleware/correlation.ts
  • src/middleware/x402.ts
  • src/routes/ai.ts
  • src/services/ai.ts
  • src/services/payment.ts
  • web/README.md
💤 Files with no reviewable changes (9)
  • src/middleware/correlation.ts
  • .github/workflows/e2e.yml
  • src/routes/ai.ts
  • src/middleware/x402.ts
  • Dockerfile
  • src/index.ts
  • src/services/ai.ts
  • src/config.ts
  • src/services/payment.ts

Repository owner deleted a comment from chatgpt-codex-connector Bot May 12, 2026
@AnkanMisra AnkanMisra changed the title T3code/353189b1 Consolidate Go gateway and update project documentation May 12, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

To use Codex here, create an environment for this repo.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex couldn't complete this request. Try again later.

@AnkanMisra

Copy link
Copy Markdown
Owner Author

@codex review the changes

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@AnkanMisra

Copy link
Copy Markdown
Owner Author

@codex retry the previous request now that the Codex Cloud environment setup has been fixed.

Add or update the repo’s AGENTS.md with strict Codex review guidelines. Deeply inspect the codebase first and make the instructions project-specific. Future Codex reviews should catch small actionable bugs, edge cases, missing tests, docs issues, PR hygiene issues, security risks, config problems, and maintainability issues, not only major bugs.

Also update related review instruction files if they exist, but keep the change focused and do not change app logic. Validate the change with the relevant safe checks before opening or updating a PR.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Summary

  • Expanded AGENTS.md with a project-specific map covering the Go gateway, Rust verifier, Next.js web app, E2E flow, and docs/config surfaces so future Codex agents understand the repository before reviewing. AGENTS.mdL3-L8
  • Added strict Codex review guidance that requires actionable findings for small bugs, edge cases, missing tests, docs/config drift, CI gaps, security risks, and PR hygiene issues instead of only major bugs. AGENTS.mdL32-L40
  • Added detailed review checklists for gateway x402/payment/cache/rate-limit behavior, verifier EIP-712/crypto behavior, web wallet/Next.js behavior, and cross-service protocol/config consistency. AGENTS.mdL42-L69
  • Added expected review output requirements so no-issue reviews explain what was checked, while findings include severity, file/line, impact, and the smallest safe fix. AGENTS.mdL71-L74
  • Updated RULES.md with concise Codex/AI review expectations that reinforce strict, specific, security-aware, cross-service review practices. RULES.mdL17-L23

Testing

  • ✅ git diff --check
  • ✅ sed -n '1,220p' AGENTS.md >/dev/null && sed -n '1,120p' RULES.md >/dev/null

View task →

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
AGENTS.md (1)

68-68: 💤 Low value

Consider clarifying "web typed data" for readability.

The phrase "web typed data" is grammatically ambiguous. Consider using "web-typed data" (if referring to typed data from the web service) or rephrasing to "web TypeScript typed data" for clarity.

✍️ Suggested rephrase
-Protocol changes must update all participants: gateway structs, verifier structs, web typed data, E2E signing, OpenAPI, README diagrams/flow, and `.env.example` when env/config is involved.
+Protocol changes must update all participants: gateway structs, verifier structs, web-typed data, E2E signing, OpenAPI, README diagrams/flow, and `.env.example` when env/config is involved.

As per coding guidelines: Treat grammar mistakes in docs as reviewable user-facing defects.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 68, The phrase "web typed data" in AGENTS.md is
ambiguous—locate the exact occurrence of the token "web typed data" and replace
it with a clearer term such as "web-typed data" if you mean typed data from the
web service, or "web TypeScript typed data" if you specifically mean
TypeScript-typed data coming from the web layer; update the sentence so the new
wording reads smoothly with the surrounding list (gateway structs, verifier
structs, web-typed data, E2E signing, OpenAPI, README diagrams/flow, and
`.env.example`) to preserve parallel structure and readability.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 7: AGENTS.md currently contradicts itself about OPENROUTER_API_KEY for
E2E: update the E2E entry that references tests/ and run_e2e.sh to explicitly
state the intended behavior (optional: tests skip AI calls when
OPENROUTER_API_KEY is absent; required: tests fail without it; or conditional:
only needed for full upstream validation), and make the same wording consistent
with the other E2E mention on the file (line referencing full upstream AI path)
so both entries match the actual behavior of the tests and workflows; reference
the E2E (`tests/`, `run_e2e.sh`) description and the "full upstream AI path"
sentence when editing to ensure alignment with CI/test scripts.
- Line 69: Update the dependency-lockfile checklist entry in AGENTS.md so it
references the Bun lockfile instead of npm's package-lock: replace the
occurrence of "web/package-lock.json" with "web/bun.lock" to match the project's
"Use Bun (not npm/node)" requirement (see the checklist line that currently
reads "Dependency changes must be justified, minimal, and reflected in the
correct lockfile"). Ensure the wording remains consistent with other references
to Bun in the file.

---

Nitpick comments:
In `@AGENTS.md`:
- Line 68: The phrase "web typed data" in AGENTS.md is ambiguous—locate the
exact occurrence of the token "web typed data" and replace it with a clearer
term such as "web-typed data" if you mean typed data from the web service, or
"web TypeScript typed data" if you specifically mean TypeScript-typed data
coming from the web layer; update the sentence so the new wording reads smoothly
with the surrounding list (gateway structs, verifier structs, web-typed data,
E2E signing, OpenAPI, README diagrams/flow, and `.env.example`) to preserve
parallel structure and readability.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cd8c1855-26a0-46db-8bf2-5487b98bd144

📥 Commits

Reviewing files that changed from the base of the PR and between 9aedfbb and 62b8115.

📒 Files selected for processing (1)
  • AGENTS.md

Comment thread AGENTS.md
- **Gateway (`gateway/`)**: Go/Gin API gateway on port 3000. It owns request timeouts, CORS/gzip, token-bucket rate limits, Redis-backed response caching, x402 payment challenge/verification orchestration, OpenRouter/Ollama upstream calls, and receipt signing/storage.
- **Verifier (`verifier/`)**: Rust/Axum service on port 3002. It verifies EIP-712 payment signatures and returns recovered wallet information.
- **Web (`web/`)**: Next.js/Bun frontend on port 3001. It requests summaries, handles 402 payment contexts, prompts wallet chain switching/signing, retries with `X-402-*` headers, and displays results.
- **E2E (`tests/`, `run_e2e.sh`)**: Bun tests that exercise the gateway/verifier payment flow and may call the AI provider when `OPENROUTER_API_KEY` is available.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify OPENROUTER_API_KEY requirement for E2E tests.

Line 7 states E2E tests "may call the AI provider when OPENROUTER_API_KEY is available" (suggesting optional), while Line 15 states E2E tests "requires OPENROUTER_API_KEY for a full upstream AI path" (suggesting required). This inconsistency could confuse contributors about whether the key is mandatory for running E2E tests.

Consider clarifying whether the key is:

  • Optional (tests skip AI calls when absent), or
  • Required (tests fail without it), or
  • Conditionally required (only for full upstream validation)

As per coding guidelines: Review documentation for inconsistent versions and mismatch with code/workflows.

Also applies to: 15-15

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 7, AGENTS.md currently contradicts itself about
OPENROUTER_API_KEY for E2E: update the E2E entry that references tests/ and
run_e2e.sh to explicitly state the intended behavior (optional: tests skip AI
calls when OPENROUTER_API_KEY is absent; required: tests fail without it; or
conditional: only needed for full upstream validation), and make the same
wording consistent with the other E2E mention on the file (line referencing full
upstream AI path) so both entries match the actual behavior of the tests and
workflows; reference the E2E (`tests/`, `run_e2e.sh`) description and the "full
upstream AI path" sentence when editing to ensure alignment with CI/test
scripts.

Comment thread AGENTS.md

### Cross-Service Review Checklist
- Protocol changes must update all participants: gateway structs, verifier structs, web typed data, E2E signing, OpenAPI, README diagrams/flow, and `.env.example` when env/config is involved.
- Dependency changes must be justified, minimal, and reflected in the correct lockfile (`bun.lock`, `web/bun.lock`, `web/package-lock.json`, `gateway/go.sum`, `verifier/Cargo.lock`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check which lockfiles are present in the project

# Check for Bun lockfile
echo "=== Bun lockfiles ==="
fd -t f 'bun.lock' .
fd -t f 'bun.lockb' .

# Check for npm lockfile
echo "=== npm lockfiles ==="
fd -t f 'package-lock.json' .

# Check web directory specifically
echo "=== Web directory lockfiles ==="
fd -t f -e lock -e lockb web/

Repository: AnkanMisra/MicroAI-Paygate

Length of output: 536


Update line 69 to reference the correct Bun lockfile.

Line 69 lists web/package-lock.json in the dependency lockfiles checklist, but line 25 explicitly states "Use Bun (not npm/node) for JS/TS runtime commands in this repo." The correct Bun lockfile is web/bun.lock, not npm's package-lock.json. Update line 69 to reference web/bun.lock to align with the project's package manager requirement.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 69, Update the dependency-lockfile checklist entry in
AGENTS.md so it references the Bun lockfile instead of npm's package-lock:
replace the occurrence of "web/package-lock.json" with "web/bun.lock" to match
the project's "Use Bun (not npm/node)" requirement (see the checklist line that
currently reads "Dependency changes must be justified, minimal, and reflected in
the correct lockfile"). Ensure the wording remains consistent with other
references to Bun in the file.

Co-authored-by: codex <codex@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
AGENTS.md (2)

73-73: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove web/package-lock.json reference - project uses Bun, not npm.

Line 73 lists web/package-lock.json in the lockfile checklist, but line 25 explicitly states "Use Bun (not npm/node) for JS/TS runtime commands." The npm lockfile should not exist in this project. Since web/bun.lock is already listed, remove the web/package-lock.json reference entirely.

✂️ Proposed fix
-- Dependency changes must be justified, minimal, and reflected in the correct lockfile (`bun.lock`, `web/bun.lock`, `web/package-lock.json`, `gateway/go.sum`, `verifier/Cargo.lock`).
+- Dependency changes must be justified, minimal, and reflected in the correct lockfile (`bun.lock`, `web/bun.lock`, `gateway/go.sum`, `verifier/Cargo.lock`).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 73, Remove the npm lockfile reference by deleting
"web/package-lock.json" from the lockfile checklist entry in AGENTS.md and
ensure the checklist only lists Bun lockfiles (e.g., "web/bun.lock") consistent
with the project's "Use Bun (not npm/node)" policy; update the checklist line
that currently contains "web/package-lock.json" so it no longer references npm
lockfiles.

7-7: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify OPENROUTER_API_KEY requirement for E2E tests.

Line 7 states E2E tests "may call the AI provider when OPENROUTER_API_KEY is available" (suggesting optional), while line 15 states E2E tests "requires OPENROUTER_API_KEY for a full upstream AI path" (suggesting conditionally required). This phrasing could confuse contributors about when the key is actually necessary.

📝 Suggested clarification

Consider unifying the language. For example:

Option A (if the key is optional):

  • Line 7: "E2E (tests/, run_e2e.sh): Bun tests that exercise the gateway/verifier payment flow; optionally tests upstream AI provider integration when OPENROUTER_API_KEY` is set."
  • Line 15: "E2E tests: bun run test:e2e (set OPENROUTER_API_KEY to test the full upstream AI integration)"

Option B (if the key is required for meaningful E2E):

  • Line 7: "E2E (tests/, run_e2e.sh): Bun tests requiring OPENROUTER_API_KEY` that exercise the full gateway/verifier/AI provider flow."
  • Line 15: "E2E tests: bun run test:e2e (requires OPENROUTER_API_KEY)"

Also applies to: 15-15

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 7, Unify the wording about OPENROUTER_API_KEY in AGENTS.md
by choosing one of the suggested phrasings and updating both places that mention
E2E tests — the line that starts "E2E (`tests/`, `run_e2e.sh`)" and the later
"**E2E tests**: `bun run test:e2e`" entry — so they consistently state whether
the key is optional (e.g., "optionally tests upstream AI provider integration
when OPENROUTER_API_KEY is set") or required (e.g., "requires OPENROUTER_API_KEY
for the full upstream AI flow"); apply the same chosen wording to both
occurrences and ensure the run command note matches (e.g., "set
OPENROUTER_API_KEY" vs "requires OPENROUTER_API_KEY").
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@AGENTS.md`:
- Line 73: Remove the npm lockfile reference by deleting "web/package-lock.json"
from the lockfile checklist entry in AGENTS.md and ensure the checklist only
lists Bun lockfiles (e.g., "web/bun.lock") consistent with the project's "Use
Bun (not npm/node)" policy; update the checklist line that currently contains
"web/package-lock.json" so it no longer references npm lockfiles.
- Line 7: Unify the wording about OPENROUTER_API_KEY in AGENTS.md by choosing
one of the suggested phrasings and updating both places that mention E2E tests —
the line that starts "E2E (`tests/`, `run_e2e.sh`)" and the later "**E2E
tests**: `bun run test:e2e`" entry — so they consistently state whether the key
is optional (e.g., "optionally tests upstream AI provider integration when
OPENROUTER_API_KEY is set") or required (e.g., "requires OPENROUTER_API_KEY for
the full upstream AI flow"); apply the same chosen wording to both occurrences
and ensure the run command note matches (e.g., "set OPENROUTER_API_KEY" vs
"requires OPENROUTER_API_KEY").

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dc959cda-4c9a-4760-af5b-cdd1d7280009

📥 Commits

Reviewing files that changed from the base of the PR and between 62b8115 and cbfa090.

📒 Files selected for processing (2)
  • AGENTS.md
  • RULES.md

@AnkanMisra
AnkanMisra merged commit 37a68b7 into main May 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant