Skip to content

feat: atomic profile writes via shared lib (DOJ-2428)#5

Open
dbejarano820 wants to merge 1 commit intomainfrom
daniel/doj-2428-atomic-writes
Open

feat: atomic profile writes via shared lib (DOJ-2428)#5
dbejarano820 wants to merge 1 commit intomainfrom
daniel/doj-2428-atomic-writes

Conversation

@dbejarano820
Copy link
Contributor

Summary

  • Created scripts/lib/profile-io.sh with atomic write (temp+mv) pattern
  • Updated all 4 hook scripts to use shared library
  • Merged dual jq passes into single-pass operations
  • Preserved jq-missing fallback and exit 0 convention

Test plan

  • bash -n passes on all scripts
  • No direct profile.json writes outside the lib
  • Scripts still output correct JSON to stdout
  • Profile writes use temp+mv pattern

Closes DOJ-2428

🤖 Generated with Claude Code

Create scripts/lib/profile-io.sh with temp+mv pattern for safe writes.
Update all hook scripts to use write_profile/update_profile.
Merge dual jq passes into single-pass operations.

Closes DOJ-2428

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dbejarano820
Copy link
Contributor Author

🤖 This PR has had no activity for 1+ days.

If it's still needed, please:

  • Resolve any conflicts
  • Address review feedback
  • Push an update

If it's no longer needed, please close it.

— Dojito (automated PR gardener)

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