Skip to content

Add idempotent job creation foundation#2753

Merged
chubes4 merged 2 commits into
mainfrom
cook/idempotent-job-creation-20260619
Jun 19, 2026
Merged

Add idempotent job creation foundation#2753
chubes4 merged 2 commits into
mainfrom
cook/idempotent-job-creation-20260619

Conversation

@chubes4

@chubes4 chubes4 commented Jun 19, 2026

Copy link
Copy Markdown
Member

Summary

  • Add nullable idempotency_key storage with a unique jobs-table index and idempotent upgrade path.
  • Add Jobs::create_or_get_job() and get_job_by_idempotency_key() so repeated deterministic keys return the existing job with created=false / already_exists=true.
  • Add PHPUnit coverage for repeated idempotent creation and missing-key validation.

Notes

  • I did not wire a runtime child-job creation path in this PR because the existing pipeline fan-out path also schedules follow-up work; safely returning an existing child needs additional coverage that duplicate chunks do not reschedule steps.

Tests

  • php -l inc/Core/Database/Jobs/Jobs.php && php -l tests/Unit/Core/Database/JobLifecycleTransitionTest.php
  • composer test (Homeboy/WP Codebox): 1366 total, 1362 passed, 4 skipped
  • composer lint

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (gpt-5.5)
  • Used for: Drafted the repository implementation, migration path, and PHPUnit coverage; Chris remains responsible for review and validation.

@homeboy-ci

homeboy-ci Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — data-machine

Lint

lint — passed

ℹ️ Full options: homeboy docs commands/lint
Deep dive: homeboy lint data-machine --changed-since ec77897

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-lint-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-lint-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/27802130651

Test

test — passed

  • 867 passed
  • 4 skipped

ℹ️ Auto-fix lint issues: homeboy refactor data-machine --from lint --write
ℹ️ Collect coverage: homeboy test data-machine --coverage
ℹ️ Save test baseline: homeboy test data-machine --baseline
ℹ️ Pass args to test runner: homeboy test -- [args]
ℹ️ Full options: homeboy docs commands/test
Deep dive: homeboy test data-machine --changed-since ec77897

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-test-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-test-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/27802130651

Audit

audit — passed

  • audit — 128 finding(s)
  • Total: 128 finding(s)

Deep dive: homeboy audit data-machine --changed-since ec77897

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-audit-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-audit-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/27802130651
Tooling versions
  • Homeboy CLI: homeboy 0.243.0+4d739ef997de+8e2add37
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: d910ef1e
  • Action: unknown@unknown

@chubes4 chubes4 merged commit 973d14b into main Jun 19, 2026
5 checks passed
@chubes4 chubes4 deleted the cook/idempotent-job-creation-20260619 branch June 19, 2026 02:52
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