Skip to content

fix(KEEP-475): follow-up — hoist regex + add bare /agent redirect#1284

Merged
eskp merged 1 commit into
stagingfrom
fix/keep-475-blockers
May 18, 2026
Merged

fix(KEEP-475): follow-up — hoist regex + add bare /agent redirect#1284
eskp merged 1 commit into
stagingfrom
fix/keep-475-blockers

Conversation

@eskp
Copy link
Copy Markdown

@eskp eskp commented May 18, 2026

Summary

Follow-up to PR #1276 (already merged). Addresses two findings from the review that were missed in the original merge:

  • Lint blocker: the inline regex /^0x[a-fA-F0-9]{40}$/ at tests/unit/well-known-erc8004.test.ts:41 violates lint/performance/useTopLevelRegex. Hoisted to a module-level EIP55_ADDRESS constant.
  • Bare /agent route 404: Linear KEEP-475 explicitly lists /agent (without .json) as a 404 alongside the .well-known/* variants. ERC-8004 indexers probe this fallback path; without it, KeeperHub's listing on those directories stays incomplete. Added app/agent/route.ts as a 301 permanent redirect to /.well-known/agent-card.json, mirroring the existing app/.well-known/agent.json/route.ts pattern.

Test plan

  • pnpm check on changed files: clean
  • pnpm type-check: clean
  • npx vitest run tests/unit/well-known-erc8004.test.ts: 4/4 pass (including the new /agent redirect assertion)
  • Full unit suite: 4616/4616 pass
  • Clean merge against current staging (verified via merge-tree)

- Hoist EIP-55 address regex to module scope in well-known-erc8004 test
  to satisfy lint/performance/useTopLevelRegex (pre-commit gate).
- Add app/agent/route.ts as a 301 permanent redirect to /agent-card.json
  so ERC-8004 indexers that probe the bare /agent path don't 404.
@eskp eskp merged commit 1f61dee into staging May 18, 2026
31 checks passed
@eskp eskp deleted the fix/keep-475-blockers branch May 18, 2026 21:31
@github-actions
Copy link
Copy Markdown

🧹 PR Environment Cleaned Up

The PR environment has been successfully deleted.

Deleted Resources:

  • Namespace: pr-1284
  • All Helm releases (Keeperhub, Scheduler, Event services)
  • PostgreSQL Database (including data)
  • LocalStack, Redis
  • All associated secrets and configs

All resources have been cleaned up and will no longer incur costs.

@github-actions
Copy link
Copy Markdown

ℹ️ No PR Environment to Clean Up

No PR environment was found for this PR. This is expected if:

  • The PR never had the deploy-pr-environment label
  • The environment was already cleaned up
  • The deployment never completed successfully

@eskp eskp mentioned this pull request May 18, 2026
12 tasks
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