Skip to content

Prove PoB Codes feed integration with existing build tests - #13

Closed
AdamZ-8113 wants to merge 1 commit into
Paliak:tests-branchfrom
AdamZ-8113:prove-pob-codes-feed
Closed

AdamZ-8113 wants to merge 1 commit into
Paliak:tests-branchfrom
AdamZ-8113:prove-pob-codes-feed

Conversation

@AdamZ-8113

Copy link
Copy Markdown

This adds a small, opt-in proof that a PoB Codes API batch can feed the existing build generator and comparator before changing the CI architecture. It targets tests-branch independently of #12; that broader proposal stays untouched.

The diff changes five files (+279/-2). Only one existing file changes: GenerateBuilds.lua accepts an optional BUILDINPUTDIR, checks failed imports/incomplete calculations in that mode, and otherwise keeps its existing link/fixture behavior. BuildDiff.sh, DiffOutput.lua, Docker Compose, production runtime code, and the existing workflows are unchanged.

  • FetchTestBuilds.py fetches one public batch (or reads saved JSON), validates each code/hash and bounded XML, and stages decoded inputs into a new directory only after the whole batch passes.
  • The focused test wraps an existing XML fixture in the API format, decodes it, runs the existing Busted generator twice, and uses the existing DiffOutput.lua to prove matching results and detection of one deliberately changed saved stat. An unsupported target must fail without a saved build.
  • A separate read-only workflow runs that proof on relevant PRs. Manual runs additionally download and decode the live batch; PR checks do not depend on the live service.
  • spec/POB_CODES_FEED_PROOF.md contains reproduction commands and the exact limits of the proof.

Validation:

  • Four Python tests passed, including the opt-in Docker generator/comparator integration and malformed/duplicate/oversized-input cases.
  • The existing Busted suite passed: 160 successes, no failures or errors.
  • The adapter fetched, validated, and decoded all 100 builds from the live API.
  • A live calculation attempt on the unchanged old runtime failed on the first current build with Feed build has no calculated output, before writing a saved build. This exposes the runtime compatibility gap; it is not presented as successful calculation of modern builds.
  • Workflow YAML parsed and git diff --check passed.

This PR adds no FIFO, monthly scheduling, persistent corpus, output cache, reporting service, or replacement runner. Those can be evaluated separately after agreeing on this integration boundary. The public API is already deployed and needs no API credential. A supported runtime is still needed for modern-build calculations; default-branch workflow registration is needed for manual GitHub dispatch, while the documented local commands work immediately.

@AdamZ-8113 AdamZ-8113 closed this Sep 6, 2026
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