Skip to content

Write job artifact files atomically#2419

Open
chubes4 wants to merge 1 commit into
mainfrom
harden/runtime-state-atomic-artifacts
Open

Write job artifact files atomically#2419
chubes4 wants to merge 1 commit into
mainfrom
harden/runtime-state-atomic-artifacts

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented May 31, 2026

Summary

  • Write job artifact JSON through same-directory temp files with locked writes and atomic rename to avoid partial final files during concurrent workers or interrupted writes.
  • Keep artifact paths stable and repeat writes idempotent while cleaning up temp files on failure.
  • Extend the hashable artifact smoke coverage for stale final-file replacement, repeated byte-identical writes, and temp-file cleanup.

Issues

Tests

  • php tests/job-artifact-hashable-smoke.php
  • php -l inc/Core/JobArtifacts.php && php -l tests/job-artifact-hashable-smoke.php
  • ./vendor/bin/phpcs inc/Core/JobArtifacts.php tests/job-artifact-hashable-smoke.php
  • homeboy test --path "/Users/chubes/Developer/data-machine@harden-runtime-state-atomic-artifacts" --extension wordpress (1305 passed, 3 skipped)

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Drafted the focused atomic artifact write implementation and targeted smoke coverage; Chris remains responsible for review and merge.

@homeboy-ci
Copy link
Copy Markdown
Contributor

homeboy-ci Bot commented May 31, 2026

Homeboy Results — data-machine

Lint

lint — failed

Deep dive: homeboy lint data-machine --changed-since 424a39a

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/26714770888

Test

test — passed

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

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/26714770888

Audit

audit — passed

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

Deep dive: homeboy audit data-machine --changed-since 424a39a

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/26714770888
Tooling versions
  • Homeboy CLI: homeboy 0.213.4+bcc6d098
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 06cc67ae
  • Action: unknown@unknown

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