zara-coding: validate commit tree object identities #187

Closed
opened 2026-09-08 02:03:10 +00:00 by nsaspy · 0 comments
Owner

Advances #1.

RepositoryInspector.commit() validates expected_head and the newly-created commit ID, but currently trusts git write-tree and git rev-parse <head>^{tree} outputs as object identities. A malformed tree ID can therefore be returned as structured commit evidence or compared as if canonical Git identity.

Acceptance:

  • deterministic RED for malformed staged-tree and parent-tree object IDs;
  • accept canonical 40- and 64-hex Git object IDs;
  • reject malformed tree identity with bounded CodingError before commit-tree/update-ref mutation;
  • preserve expected-head fencing, attached-branch requirement, no-staged-change rejection, bounded commit message, and structured commit evidence;
  • focused tests, registry compatibility, full nix flake check, generated package builds, exact-head protected merge.
Advances #1. `RepositoryInspector.commit()` validates `expected_head` and the newly-created commit ID, but currently trusts `git write-tree` and `git rev-parse <head>^{tree}` outputs as object identities. A malformed tree ID can therefore be returned as structured commit evidence or compared as if canonical Git identity. Acceptance: - deterministic RED for malformed staged-tree and parent-tree object IDs; - accept canonical 40- and 64-hex Git object IDs; - reject malformed tree identity with bounded `CodingError` before commit-tree/update-ref mutation; - preserve expected-head fencing, attached-branch requirement, no-staged-change rejection, bounded commit message, and structured commit evidence; - focused tests, registry compatibility, full `nix flake check`, generated package builds, exact-head protected merge.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara-plugins#187
No description provided.