Skip to content

feat(fetch-results): publish matchfinished when a match is finished - #18

Merged
TomSoulage merged 6 commits into
mainfrom
feat/fetch-results
Nov 1, 2026
Merged

TomSoulage merged 6 commits into
mainfrom
feat/fetch-results

Conversation

@TomSoulage

@TomSoulage TomSoulage commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Second half of #4: the fetch-results Lambda, which uses the Treize Mondial adapter (#17) and publishes MatchFinished on a new event bus.

  • The final-whistle event bus and the MatchFinished contract in src/events (D28), to be shared with notify's rule in MatchFinished bus and notify #5.
  • fetch-results: validates the match key, looks the match up and publishes once it is finished. Every outcome is logged as JSON with the match id, and failures are rethrown so the invocation is retried.
  • An in-house JSON logger (D29) and a cold-start check of required environment variables.
  • Infra: Node.js 24 on arm64, its own role limited to its log group and events:PutEvents on the bus, and a log group with a 30-day retention.

For reviewers:

  • PutEvents does not throw when an entry is rejected, it only reports it in the response. publishMatchFinished turns a rejection into an error, so a score is retried rather than lost.
  • Nothing invokes the Lambda yet: the planner and the one-time schedules come in Planner and one-time schedules #6. Nothing consumes the events yet: that is MatchFinished bus and notify #5. The DLQ and alarms are DLQ and alarms #7.
  • The bundled handler was run locally on the live page (not finished, not found, invalid input). The finished path against the real bus will be checked by invoking the deployed Lambda after the merge.

Closes #4.

TomSoulage and others added 6 commits November 1, 2026 10:29
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bles

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e the status

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TomSoulage TomSoulage added documentation Improvements or additions to documentation feature New feature or improvement infra CDK, IAM and AWS resources app Lambda code: adapters, planner, fetch-results, notify dependencies Pull requests that update a dependency file labels Nov 1, 2026
@TomSoulage
TomSoulage merged commit 3b363cc into main Nov 1, 2026
11 checks passed
@TomSoulage
TomSoulage deleted the feat/fetch-results branch November 1, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Lambda code: adapters, planner, fetch-results, notify dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation feature New feature or improvement infra CDK, IAM and AWS resources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Treize Mondial adapter and fetch-results

1 participant