Skip to content

Make Swift helper compile cache safe under parallel builds #570

@thymikee

Description

@thymikee

What to build

Make Swift helper executable caching safe when multiple agent-device processes build the same cache key at the same time. This is most likely during parallel record stop or recording post-processing tests.

The fix should preserve the cache performance benefit while avoiding flaky rename or partial-artifact races.

Acceptance criteria

  • Swift helper compilation writes to a unique temporary artifact before publishing the cache entry.
  • Cache publication is atomic or protected so concurrent builders cannot leave a partial executable.
  • If another process wins the cache race, the loser reuses the completed executable without failing.
  • Tests simulate concurrent builds of the same cache key.
  • Existing Swift script typecheck and recording tests continue to pass.

Blocked by

None - can start immediately

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions