Skip to content

feat/next hex task - #174

Merged
flyingrobots merged 7 commits into
mainfrom
feat/next-hex-task
Sep 29, 2025
Merged

flyingrobots merged 7 commits into
mainfrom
feat/next-hex-task

Conversation

@flyingrobots

@flyingrobots flyingrobots commented Sep 29, 2025 •

Copy link
Copy Markdown
Owner
  • chore(logs): capture post-merge status and update ledger
  • test(cache): add strict equality regression coverage

Summary by CodeRabbit

  • Documentation

    • Replaced “SHA” terminology with “OID” across CLI, technical, architecture, migration, and install docs.
    • Added 2025-09-29 entries to AGENTS and activity logs; refreshed dates and recent-changes metadata.
    • Marked MVP strict-equality tasks complete and updated progress in the features ledger.
    • Added preserved code-review notes for a prior PR.
  • Tests

    • Added a new unit test covering cache/journal strict-equality scenarios.
    • Enhanced journal CBOR tests to capture and validate edge data and OID consistency.
    • Registered the new test in the test suite.

@coderabbitai

coderabbitai Bot commented Sep 29, 2025 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a new unit test for cache strict equality, updates an existing journal test to capture and validate edges, registers the new test in the build, and updates multiple documentation files to reflect OID-first terminology and progress notes. No public APIs or runtime behavior changed.

Changes

Cohort / File(s) Summary
Unit tests: cache/journal strict equality
core/tests/unit/test_cache_strict_equality.c, core/tests/unit/test_journal_mixed_cbor.c
New C unit test validating gm_cache_is_stale OID-vs-hex behavior; existing journal test updated to capture and assert last-edge OIDs with stricter argument checks.
Build configuration
meson.build
Adds test_cache_strict_equality executable and registers it as a test with required deps and includes.
CLI docs (OID terminology sweep)
docs/cli/combined_markdown.md, docs/cli/gitmind-cache-rebuild.md, docs/cli/gitmind-install-hooks.md, docs/cli/gitmind-link.md, docs/cli/gitmind-list.md, docs/cli/gitmind.md
Replaces “SHA” with “OID” across descriptions, examples, options, and notes; clarifies legacy flag/output labels where applicable.
Technical/Architecture docs
docs/TECHNICAL.md, docs/architecture/deprecations/legacy-sha-fields.md
Documents OID-first comparison via gm_oid_equal with hex fallback; updates dates and adds notes on regression tests and compatibility.
Project activity and agents logs
docs/activity/2025-09.md, AGENTS.md
Adds 2025-09-29 entries detailing strict-equality follow-through, PR management, and upcoming tasks.
Features tracking
docs/features/Features_Ledger.md
Marks GM.MVP.T001 tasks as complete; updates progress indicators and timestamps.
Code review artifact
docs/code-reviews/PR174/bc1fc319303bf1a00b43b03a40992ba788996b1a.md
Adds preserved review notes and metadata for PR #174; content only.

Sequence Diagram(s)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

A bunny taps tests with gentle delight,
OIDs hop first, hex trails in sight.
Journals and caches now nose-to-nose,
Equality strict where the timeline flows.
Docs bloom fresh like clover in spring—
“All green,” I twitch—what joy they bring! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (3 warnings)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “feat/next hex task” follows a branch naming convention rather than clearly summarizing the key changes in this pull request, and the phrase “next hex task” is too vague to convey its content about adding strict equality regression tests and updating post-merge logs. It does not highlight the main development work or documentation updates in a concise, descriptive manner. As a result, teammates scanning the commit history would not immediately understand what this PR accomplishes. Please update the title to a clear, concise sentence that reflects the primary work in this PR, for example “Add strict cache equality regression tests and update post-merge logs,” so that the commit history clearly communicates its purpose.
Description Check ⚠️ Warning The provided description consists solely of commit-style bullet points and does not follow the repository’s required template sections—there is no Summary explaining why the changes are needed, no Change Areas checklist, no Risk assessment, and no Code Review Guidance. This makes it difficult for reviewers to understand the scope, affected areas, and potential risks of the PR at a glance. The description must align with the template to ensure consistency and clarity across contributions. Please revise the PR description to include the template’s sections: add a “## Summary” that describes the changes and their purpose, complete the “## Change Areas” checklist, indicate the appropriate “## Risk” items, and provide “## Code Review Guidance” with any top-risk details and suggested fix-it blocks.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.

📜 Recent review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e2eb59c and 5f35f8e.

📒 Files selected for processing (2)
  • core/tests/unit/test_cache_strict_equality.c (1 hunks)
  • core/tests/unit/test_journal_mixed_cbor.c (3 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (6)
docs/cli/gitmind-cache-rebuild.md (2)

17-24: Make ToC a level-2 heading to satisfy docs rules and markdownlint.

Change “Table of Contents” to an H2.

-Table of Contents
+## Table of Contents

1-12: Move SPDX and copyright blocks after the YAML front matter

Remove the first two lines (the SPDX header and copyright notice) and reinsert them immediately after the closing --- of the front matter in docs/cli/gitmind-cache-rebuild.md, then run make docs-verify.

docs/architecture/deprecations/legacy-sha-fields.md (2)

13-21: Promote ToC to H2 heading.

-Table of Contents
+## Table of Contents

1-12: Insert SPDX/license after the front matter (currently missing).

 ---
 title: Deprecation Notice: Legacy SHA-1 Byte Arrays in Edges
 description: Plan to remove SHA-1 specific arrays in favor of OID-only APIs and storage.
 audience: [developers]
 domain: [architecture]
 tags: [deprecation, oid]
 status: planned
 last_updated: 2025-09-29
 ---
+
+<!-- SPDX-License-Identifier: LicenseRef-MIND-UCAL-1.0 -->
+<!-- © 2025 J. Kirby Ross / Neuroglyph Collective -->
docs/cli/gitmind-link.md (2)

17-24: Make ToC an H2 to pass docs checks.

-Table of Contents
+## Table of Contents

1-12: Move SPDX/license after the front matter

-<!-- SPDX-License-Identifier: LicenseRef-MIND-UCAL-1.0 -->
-<!-- © 2025 J. Kirby Ross / Neuroglyph Collective -->
 ---
 title: git-mind link
 description: Create a semantic connection between two paths.
 audience: [users, developers]
 domain: [cli]
 tags: [cli, link]
 status: stable
 last_updated: 2025-09-15
 ---
 
+<!-- SPDX-License-Identifier: LicenseRef-MIND-UCAL-1.0 -->
+<!-- © 2025 J. Kirby Ross / Neuroglyph Collective -->

Run make docs-verify to ensure markdownlint and TOC checks pass.

🧹 Nitpick comments (12)
docs/cli/gitmind-cache-rebuild.md (1)

51-55: OID-first terminology LGTM; consider cross-linking the deprecation note.

The forward/reverse index wording and the temporary “SHA” note read well. Optional: add a “See also” link to docs/architecture/deprecations/legacy-sha-fields.md to anchor the rename rationale.

AGENTS.md (1)

418-425: Good activity log; mirror migration notes into dated activity doc.

Add a brief entry under docs/activity/2025-09-29_hexagonal.md per policy so the migration log isn’t only in AGENTS.md. I can draft it from this block if helpful.

Based on learnings

docs/architecture/deprecations/legacy-sha-fields.md (1)

47-49: Clarify fallback trigger.

Wording is good; add “when either side lacks a binary OID” to avoid implying a two-sided absence is required.

-Consumers should use `gm_oid_t` exclusively and compare via `gm_oid_equal`,
-  falling back to legacy SHA bytes only when a binary OID is unavailable.
+Consumers should use `gm_oid_t` exclusively and compare via `gm_oid_equal`,
+  falling back to legacy SHA bytes only when either side lacks a binary OID.
docs/cli/gitmind-link.md (1)

156-164: OID wording LGTM; tiny UX tweak optional.

Consider adding “(aka content hashes)” after first “object IDs (OIDs)” to help users mapping old mental model.

docs/cli/gitmind.md (3)

114-116: Terminology note: mention the legacy flag for clarity.

Good callout about legacy “SHA” labels. Consider adding “see --show-sha (legacy name)” to tie this to the flag users will encounter.


191-191: Consistency nit: align with list docs phrasing.

To reduce confusion, mirror the list-page phrasing: “labels retain the legacy ‘SHA’ name; values are OIDs.”


1-12: Fix doc structure: SPDX after front matter; add proper ToC heading.

  • Move SPDX/license comments to immediately after the front matter.
  • Change the literal “Table of Contents” line to an H2 “## Table of Contents” to satisfy guidance and markdownlint.

Apply:

-<!-- SPDX-License-Identifier: LicenseRef-MIND-UCAL-1.0 -->
-<!-- © 2025 J. Kirby Ross / Neuroglyph Collective -->
-
----
+---
 title: git-mind (command)
@@
 last_updated: 2025-09-15
 ---
+
+<!-- SPDX-License-Identifier: LicenseRef-MIND-UCAL-1.0 -->
+<!-- © 2025 J. Kirby Ross / Neuroglyph Collective -->
@@
-Table of Contents
+## Table of Contents
docs/cli/gitmind-list.md (1)

18-24: Make ToC a proper H2 heading.

Change plain text “Table of Contents” to “## Table of Contents” for consistency with docs rules.

-Table of Contents
+## Table of Contents
docs/cli/gitmind-install-hooks.md (1)

18-25: Promote ToC to H2 for consistency.

Use “## Table of Contents” to align with docs rules.

-Table of Contents
+## Table of Contents
docs/code-reviews/PR174/bc1fc319303bf1a00b43b03a40992ba788996b1a.md (1)

1-12: Bring file into docs standard: title/H1, SPDX, ToC.

  • Title/H1: align by setting title to “Code Review Feedback” or change H1 to match current title.
  • Add SPDX/license comments after front matter.
  • Add “## Table of Contents”.
 ---
-title: bc1fc319303bf1a00b43b03a40992ba788996b1a.md
+title: Code Review Feedback
 description: Preserved review artifacts and rationale.
@@
 ---
 
-# Code Review Feedback
+# Code Review Feedback
+
+## Table of Contents
+
+<!-- SPDX-License-Identifier: LicenseRef-MIND-UCAL-1.0 -->
+<!-- © 2025 J. Kirby Ross / Neuroglyph Collective -->

Based on learnings

docs/TECHNICAL.md (2)

19-21: Clarify OID-first fallback condition.

Consider tightening the phrasing: “falling back to SHA hex only if a binary OID is unavailable in legacy paths.” Helps avoid implying mixed-mode by default.

-- OID‑first APIs: new interfaces use `gm_oid_t` and compare via `gm_oid_equal`,
-  falling back to SHA hex only when a binary OID is unavailable.
+- OID‑first APIs: new interfaces use `gm_oid_t` and compare via `gm_oid_equal`,
+  falling back to SHA hex only if a binary OID is unavailable in legacy paths.

79-80: Align with helper usage: prefer gm_ formatting helpers over direct libgit2.*

Docs currently say to use git_oid_fmt/git_oid_tostr, which conflicts with guidance to prefer gm_oid_to_hex/gm_bytes_to_hex.

-- OID formatting/prefixing now uses libgit2 (`git_oid_fmt`, `git_oid_tostr`).
+- OID formatting/prefixing should use project helpers (`gm_oid_to_hex`, `gm_bytes_to_hex`);
+  avoid direct `git_oid_*` formatting in new code.

Based on learnings

📜 Review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e08d76f and e2eb59c.

📒 Files selected for processing (15)
  • AGENTS.md (1 hunks)
  • core/tests/unit/test_cache_strict_equality.c (1 hunks)
  • core/tests/unit/test_journal_mixed_cbor.c (3 hunks)
  • docs/TECHNICAL.md (4 hunks)
  • docs/activity/2025-09.md (1 hunks)
  • docs/architecture/deprecations/legacy-sha-fields.md (3 hunks)
  • docs/cli/combined_markdown.md (10 hunks)
  • docs/cli/gitmind-cache-rebuild.md (2 hunks)
  • docs/cli/gitmind-install-hooks.md (3 hunks)
  • docs/cli/gitmind-link.md (1 hunks)
  • docs/cli/gitmind-list.md (2 hunks)
  • docs/cli/gitmind.md (2 hunks)
  • docs/code-reviews/PR174/bc1fc319303bf1a00b43b03a40992ba788996b1a.md (1 hunks)
  • docs/features/Features_Ledger.md (2 hunks)
  • meson.build (2 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
{docs/**/*.md,README.md}

📄 CodeRabbit inference engine (AGENTS.md)

{docs/**/*.md,README.md}: Docs must have front matter first, a single H1, a '## Table of Contents', and H1/title alignment; API docs include api_version; SPDX/license after front matter
Markdown style should satisfy markdownlint configuration (.markdownlint.jsonc)

Files:

  • docs/cli/gitmind-cache-rebuild.md
  • docs/cli/gitmind-install-hooks.md
  • docs/cli/gitmind.md
  • docs/TECHNICAL.md
  • docs/cli/gitmind-link.md
  • docs/cli/combined_markdown.md
  • docs/cli/gitmind-list.md
  • docs/code-reviews/PR174/bc1fc319303bf1a00b43b03a40992ba788996b1a.md
  • docs/architecture/deprecations/legacy-sha-fields.md
  • docs/activity/2025-09.md
  • docs/features/Features_Ledger.md
meson.build

📄 CodeRabbit inference engine (AGENTS.md)

Meson build targets should keep c_std set to c2x (targeting C23) and options defined in meson_options.txt

Files:

  • meson.build
docs/activity/**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

After each migration, document lessons/status in docs/activity/_hexagonal.md

Files:

  • docs/activity/2025-09.md
**/*.{c,cc,cpp,cxx,h,hpp,hxx,m,mm}

📄 CodeRabbit inference engine (CLAUDE.md)

NEVER use NOLINT to suppress clang-tidy warnings; ALWAYS fix the underlying issue

Files:

  • core/tests/unit/test_cache_strict_equality.c
  • core/tests/unit/test_journal_mixed_cbor.c
core/**/*.{c,h}

📄 CodeRabbit inference engine (AGENTS.md)

core/**/*.{c,h}: Use safe ops: gm_snprintf, gm_strcpy_safe, gm_memcpy_span; check return codes; treat truncation as error
Zero output buffers on failure paths before formatting or copying
Do not use GM_PATH_MAX*2 buffers; prefer GM_PATH_MAX or allocate when larger needed
Language: C23; forbid VLAs and shadowing; require explicit prototypes; warnings as errors
Includes: prefer specific headers; order/regroup per .clang-format
Naming: functions/vars lower_snake_case prefixed gm_; macros UPPER_SNAKE; types end with t; header guards start with GITMIND
Enforce OID-first behavior for identity/equality; use git_oid (gm_oid_t) in new interfaces and compare via git_oid_cmp or gm-level helpers
One-Thing rule: when touching multi-concern files, extract the edited type/function into its own file (one enum/struct/module per TU where practical)
Keep clang-tidy at zero warnings for touched files; do not introduce new diagnostics

Files:

  • core/tests/unit/test_cache_strict_equality.c
  • core/tests/unit/test_journal_mixed_cbor.c
**/*.{c,h}

📄 CodeRabbit inference engine (AGENTS.md)

Formatting via clang-format (LLVM style, 4 spaces, 80 cols, right-aligned pointers); pre-commit enforces

Files:

  • core/tests/unit/test_cache_strict_equality.c
  • core/tests/unit/test_journal_mixed_cbor.c
core/tests/unit/test_*.c

📄 CodeRabbit inference engine (AGENTS.md)

Unit tests live in core/tests/unit/ and are named test_.c; keep deterministic and isolated

Files:

  • core/tests/unit/test_cache_strict_equality.c
  • core/tests/unit/test_journal_mixed_cbor.c
core/tests/!(fakes)/**.{c,h}

📄 CodeRabbit inference engine (AGENTS.md)

Test code (non-fakes) should not include libgit2 headers; prefer ports and fakes

Files:

  • core/tests/unit/test_cache_strict_equality.c
  • core/tests/unit/test_journal_mixed_cbor.c
core/tests/**

📄 CodeRabbit inference engine (AGENTS.md)

Unit tests should rely on fakes only; integration tests may use real adapters within Docker

Files:

  • core/tests/unit/test_cache_strict_equality.c
  • core/tests/unit/test_journal_mixed_cbor.c
🧠 Learnings (9)
📓 Common learnings
Learnt from: flyingrobots
PR: neuroglyph/git-mind#169
File: docs/templates/code-review-feedback.md:26-33
Timestamp: 2025-09-16T17:10:27.477Z
Learning: The user (flyingrobots) uses Obsidian to view/edit Markdown files and prefers to keep Obsidian-specific syntax like collapsible callout markers (e.g., `[!NOTE]-` for collapsible callouts) even if they're not GitHub-compatible.
📚 Learning: 2025-09-29T12:20:59.326Z
Learnt from: CR
PR: neuroglyph/git-mind#0
File: AGENTS.md:0-0
Timestamp: 2025-09-29T12:20:59.326Z
Learning: Applies to docs/activity/**/*.md : After each migration, document lessons/status in docs/activity/<date>_hexagonal.md

Applied to files:

  • AGENTS.md
📚 Learning: 2025-09-14T09:27:33.283Z
Learnt from: CR
PR: neuroglyph/git-mind#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-14T09:27:33.283Z
Learning: Tag all memories saved to MEMORY BANKS with at least #git-mind

Applied to files:

  • docs/cli/gitmind.md
📚 Learning: 2025-09-29T12:20:59.326Z
Learnt from: CR
PR: neuroglyph/git-mind#0
File: AGENTS.md:0-0
Timestamp: 2025-09-29T12:20:59.326Z
Learning: Applies to core/**/*.{c,h} : Enforce OID-first behavior for identity/equality; use git_oid (gm_oid_t) in new interfaces and compare via git_oid_cmp or gm-level helpers

Applied to files:

  • docs/TECHNICAL.md
  • docs/architecture/deprecations/legacy-sha-fields.md
  • docs/activity/2025-09.md
  • docs/features/Features_Ledger.md
  • core/tests/unit/test_journal_mixed_cbor.c
📚 Learning: 2025-09-29T12:20:59.326Z
Learnt from: CR
PR: neuroglyph/git-mind#0
File: AGENTS.md:0-0
Timestamp: 2025-09-29T12:20:59.326Z
Learning: Applies to core/src/**/{*.c,*.h} : Prefer gm_oid_to_hex and gm_bytes_to_hex helpers over direct git_oid_* formatting utilities

Applied to files:

  • docs/TECHNICAL.md
  • docs/cli/gitmind-link.md
  • docs/architecture/deprecations/legacy-sha-fields.md
  • docs/activity/2025-09.md
  • core/tests/unit/test_journal_mixed_cbor.c
📚 Learning: 2025-09-13T03:13:54.145Z
Learnt from: CR
PR: neuroglyph/git-mind#0
File: AGENTS.md:0-0
Timestamp: 2025-09-13T03:13:54.145Z
Learning: Applies to core/tests/unit/test_*.c : Unit tests live in core/tests/unit/ and are named test_<module>.c; keep tests deterministic and isolated

Applied to files:

  • core/tests/unit/test_cache_strict_equality.c
📚 Learning: 2025-09-29T12:20:59.326Z
Learnt from: CR
PR: neuroglyph/git-mind#0
File: AGENTS.md:0-0
Timestamp: 2025-09-29T12:20:59.326Z
Learning: Applies to core/tests/unit/test_*.c : Unit tests live in core/tests/unit/ and are named test_<module>.c; keep deterministic and isolated

Applied to files:

  • core/tests/unit/test_cache_strict_equality.c
📚 Learning: 2025-09-29T12:20:59.326Z
Learnt from: CR
PR: neuroglyph/git-mind#0
File: AGENTS.md:0-0
Timestamp: 2025-09-29T12:20:59.326Z
Learning: Applies to core/tests/!(fakes)/**.{c,h} : Test code (non-fakes) should not include libgit2 headers; prefer ports and fakes

Applied to files:

  • core/tests/unit/test_cache_strict_equality.c
📚 Learning: 2025-09-29T12:20:59.326Z
Learnt from: CR
PR: neuroglyph/git-mind#0
File: AGENTS.md:0-0
Timestamp: 2025-09-29T12:20:59.326Z
Learning: Applies to core/tests/fakes/**/*.c : Deterministic fakes/mocks/stubs must exist for each port under core/tests/fakes/**

Applied to files:

  • core/tests/unit/test_cache_strict_equality.c
🧬 Code graph analysis (2)
core/tests/unit/test_cache_strict_equality.c (2)
core/include/gitmind/security/memory.h (1)
  • gm_memset_safe (47-59)
core/src/cache/query.c (1)
  • gm_cache_is_stale (157-208)
core/tests/unit/test_journal_mixed_cbor.c (3)
core/include/gitmind/util/memory.h (1)
  • gm_memcpy_span (32-47)
core/src/edge/edge.c (1)
  • gm_edge_encode_cbor (260-361)
core/src/journal/reader.c (2)
  • gm_journal_read (372-376)
  • gm_journal_read_attributed (379-383)
🔇 Additional comments (31)
docs/activity/2025-09.md (1)

28-36: Strict-equality test is wired correctly; please verify docs build and ledger entry

  • test_cache_strict_equality is declared and linked in meson.build (lines 321 & 393).
  • Cannot run make docs-verify here; confirm your local docs build passes and that GM.MVP.T001 appears in docs/activity/2025-09.md.
docs/cli/gitmind.md (1)

120-126: LGTM: OID-first wording.

The AUGMENTS/OID explanation is clear and consistent with the PR’s shift to OIDs.

docs/cli/gitmind-list.md (2)

93-95: LGTM: flag description matches OID-first migration.

Clear that the flag name is legacy while values are OIDs.


269-274: LGTM: output metadata now references OIDs.

Matches the updated flag semantics.

docs/cli/gitmind-install-hooks.md (3)

44-50: LGTM: OID terminology in evolution example.

Example correctly switches from SHA to OID and is easy to follow.


121-128: LGTM: step uses “old blob OID”.

Accurately reflects the OID-first behavior.


198-205: LGTM: edge format fields renamed to src_oid/tgt_oid.

Field names and comments align with migration.

docs/TECHNICAL.md (2)

59-60: LGTM: test focus items.

The CBOR round‑trip and gm_snprintf truncation paths callout is helpful and concrete.


71-76: LGTM: recent changes capture strict-equality guardrails.

The gm_oid_equal‑before‑hex fallback sequencing is documented clearly.

core/tests/unit/test_cache_strict_equality.c (8)

1-18: LGTM: Clean headers and includes

The SPDX license header and include structure are well-organized and appropriate for this unit test.


19-26: Well-designed test harness structure

The test_git_repo_port_t structure effectively extends the base port type and provides the necessary state management for simulating different reference scenarios in the tests.


28-196: Comprehensive and well-structured stub implementations

The stub functions properly implement the full vtable interface while providing realistic behavior for the test scenarios. The reference_tip function contains the core logic needed to test different OID scenarios, and all stubs handle parameters appropriately.


55-88: Excellent implementation of reference tip simulation

The reference_tip function effectively simulates different reference scenarios with proper prefix matching, bounds checking, and stateful sequence management. The use of gm_memset_safe and careful index management shows good attention to safety.


208-254: Well-organized helper functions and vtable

The vtable setup and helper functions are cleanly implemented. The set_tip function's flexibility to handle both binary OID and hex scenarios is particularly well-suited for the test scenarios.


273-302: Excellent OID-first equality test scenarios

These scenarios effectively test the core OID-first behavior requirement. Scenario 1 validates that OID matches ignore hex mismatches (correct behavior), while scenario 2 confirms OID mismatches are properly detected. This aligns perfectly with the coding guidelines for OID-first equality enforcement.


303-329: Comprehensive coverage of hex fallback scenarios

These scenarios provide excellent coverage of the fallback behavior when binary OIDs are missing. The test design effectively validates both the positive case (hex match when OID missing) and negative case (hex mismatch detection), ensuring robust fallback handling.


267-267: Clean test structure and output

The test main function has good organization with clear scenario separation and appropriate success messaging for CI integration.

Also applies to: 330-332

meson.build (2)

321-325: LGTM: Standard test executable definition

The new test_cache_strict_equality executable follows the established pattern with correct source path, include directories, dependencies, and linking. The configuration matches other unit tests in the file.


393-393: Correct test registration

The test registration follows the established pattern and naming convention, properly integrating the new test into the build system.

docs/cli/combined_markdown.md (4)

143-144: Good terminology update to OID-first language

The update from "source SHA" to "source object ID (OID)" and similar for target aligns well with the codebase's OID-first approach while maintaining clear functional descriptions.
Based on coding guidelines


146-146: Thoughtful handling of terminology transition

The approach of updating core terminology to "OID" while noting that "legacy CLI output may still print 'SHA'" provides a good balance during the transition period. The technical accuracy is improved while acknowledging user-facing compatibility.

Also applies to: 234-234


318-318: Comprehensive and consistent terminology updates

The updates throughout the document consistently replace "blob SHA" with "blob object ID" and related terminology. The changes maintain technical accuracy while providing a cohesive OID-first presentation across different sections.
Based on coding guidelines

Also applies to: 659-659, 663-663, 1260-1260, 1265-1265, 1336-1336


882-882: Clear documentation of flag transition

The documentation for the --show-sha flag effectively communicates that while the flag name retains the legacy "SHA" label, it now displays blob object IDs (OIDs). This provides good user guidance during the terminology transition.

Also applies to: 1060-1060

docs/features/Features_Ledger.md (2)

8-8: Accurate task completion tracking

The update to GM.MVP.T001 "Finalize strict equality" from incomplete (0/4) to complete (4/4) with 100% progress bar accurately reflects the implementation of strict equality regression tests and documentation updates in this PR. The timestamp update to 2025-09-29 properly tracks the completion date.

Also applies to: 140-144


141-144: Well-aligned task completion details

The completion of all four sub-tasks (audit equality helpers, add regression tests, update docs, sweep references) accurately reflects the scope of work completed in this PR, including the new strict equality test and documentation updates.

core/tests/unit/test_journal_mixed_cbor.c (6)

22-30: Enhanced context structures for better validation

The addition of last fields to store complete edge data enables more thorough validation of journal read operations beyond simple counting. The new attr_ctx_t structure maintains consistency with the pattern.


32-58: Improved callback implementations with proper validation

The updated callbacks now include proper parameter validation, safe memory copying with gm_memcpy_span, and clear error handling. The rename from count_* to capture_* better reflects their enhanced functionality.
Based on coding guidelines


82-87: Clean test data setup with safe operations

The upfront creation of rawA and rawB buffers with immediate population of edge SHA fields using gm_memcpy_span provides clean test data organization and follows safe coding practices.
Based on coding guidelines


125-128: Proper setup for OID validation

The creation of expected OID values using gm_oid_from_raw provides a solid foundation for validating that the journal read operations preserve OID data correctly.
Based on coding guidelines


130-135: Comprehensive OID validation for basic edges

The enhanced validation now verifies that captured edges have non-zero OIDs and that they match expected values. This provides much stronger testing of OID-first behavior compared to simple counting.
Based on coding guidelines


137-142: Consistent validation pattern for attributed edges

The attributed edge validation follows the same comprehensive pattern as basic edges, ensuring that both edge types properly preserve OID data through the journal read process.
Based on coding guidelines

Docstrings generation was requested by @flyingrobots.

* #174 (comment)

The following files were modified:

* `core/tests/unit/test_cache_strict_equality.c`
* `core/tests/unit/test_journal_mixed_cbor.c`
@coderabbitai

coderabbitai Bot commented Sep 29, 2025

Copy link
Copy Markdown
Contributor

Note

Generated docstrings for this pull request at #175

@flyingrobots
flyingrobots merged commit 7900e87 into main Sep 29, 2025
4 checks passed
@flyingrobots
flyingrobots deleted the feat/next-hex-task branch September 29, 2025 16:09
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