doge
pushed to koan/build-lifecycle at Troglodyne/Test-Mapper
bf8d110287 feat: add build lifecycle — start_build, claim_test, complete_test, build_results
Closes the loop from test mapping to distributed CI coordination.
- Test::Mapper: start_build() queues tests for a build (given changed resources),
claim_test() atomically claims one for a worker, complete_test() records the
result, build_results() returns the full run summary.
- DB.pm: drop unused File::Slurper import; fix `run` VIEW which produced a
cross-product between route/environment rows and test_for_build rows —
simplified to a clean join over product/build/test.
- Makefile.PL: remove File::Slurper from PREREQ_PM.
- t/mapper.t: extended from 8 to 20 tests covering the full build lifecycle.
- Readme.md: rewritten from 3 lines to a proper module description with
usage examples for all three phases (map, select, coordinate).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
f835fe4d1f fix: correct DB.pm bugs, add Makefile.PL, implement Mapper API, add tests
DB.pm had multiple fatal issues: __DATA__ SQL was read then mistakenly
treated as a filename (would always die), missing use statements for DBI/
File::Touch/File::Slurper, broken VIEW syntax (parentheses around SELECT
list), test_for_build.build_id used as PRIMARY KEY (capped each build to
one test), missing IF NOT EXISTS on build/route/test tables, and the
to_run view referenced t.test_id (nonexistent) and environment alias 'e'
without declaring AS e.
Also adds: Makefile.PL with correct prereqs, VERSION in Mapper.pm,
working implementation of new/map_test/tests_for_resources, and an 8-test
suite covering the basic lifecycle.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
874025e89f Initial Commit
1 month ago