Repository navigation
chore/code rabbit cleanup #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ca81a0f
203f4e3
5d58351
d550035
7b7b5f5
6086275
df33c8c
5add14f
daca6b8
6370b30
8a32c6a
093b7cb
85ea6a6
82dab21
a280499
abea4c4
b22c223
208b5f7
fecc9d6
25b4875
d11ee83
b2ed050
5402cad
0363808
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: CodeRabbit Status | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened, reopened, synchronize, ready_for_review] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| coderabbit: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.x' | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install requests | ||
| - name: Check unresolved CodeRabbit threads | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| python3 tools/review/check_coderabbit_threads.py \ | ||
| --owner "${GITHUB_REPOSITORY%%/*}" \ | ||
| --repo "${GITHUB_REPOSITORY##*/}" \ | ||
| --pr ${{ github.event.number }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Cleanup Review Worksheets | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [closed] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| cleanup: | ||
| if: github.event.pull_request.merged == true | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: ${{ github.event.pull_request.base.ref }} | ||
|
|
||
| - name: Configure git | ||
| run: | | ||
| git config user.name "P.R. PhiedBach" | ||
| git config user.email "phiedbach@bikeshed.dungeon" | ||
|
|
||
| - name: Remove review artifacts | ||
| run: | | ||
| pr_number=${{ github.event.pull_request.number }} | ||
| review_dir="docs/code-reviews/PR${pr_number}" | ||
| if [ -d "$review_dir" ]; then | ||
| git rm -r "$review_dir" | ||
| fi | ||
| # Remove any rejected-suggestion docs tied to this PR number | ||
| git ls-files "docs/code-reviews/rejected-suggestions/*_${pr_number}_*.md" | xargs -r git rm | ||
|
|
||
| - name: Commit cleanup | ||
| run: | | ||
| if git diff --cached --quiet; then | ||
| echo "No review artifacts to delete; skipping commit." | ||
| exit 0 | ||
| fi | ||
| git commit -m "coda(PR#${{ github.event.pull_request.number }}): archive rehearsal notes" | ||
|
|
||
| - name: Push cleanup commit | ||
| run: | | ||
| git push | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,35 @@ | ||||||||||||||||||
| /* SPDX-License-Identifier: LicenseRef-MIND-UCAL-1.0 */ | ||||||||||||||||||
| /* © 2025 J. Kirby Ross / Neuroglyph Collective */ | ||||||||||||||||||
|
|
||||||||||||||||||
| #ifndef GITMIND_EDGE_INTERNAL_BLOB_IDENTITY_H | ||||||||||||||||||
| #define GITMIND_EDGE_INTERNAL_BLOB_IDENTITY_H | ||||||||||||||||||
|
|
||||||||||||||||||
| #include <stdint.h> | ||||||||||||||||||
|
|
||||||||||||||||||
| #include "gitmind/context.h" | ||||||||||||||||||
| #include "gitmind/result.h" | ||||||||||||||||||
| #include "gitmind/types.h" | ||||||||||||||||||
|
|
||||||||||||||||||
| #ifdef __cplusplus | ||||||||||||||||||
| extern "C" { | ||||||||||||||||||
| #endif | ||||||||||||||||||
|
|
||||||||||||||||||
| /** | ||||||||||||||||||
| * Resolve the blob identity for a file path using the current repository head. | ||||||||||||||||||
| * | ||||||||||||||||||
| * On success, both the preferred OID (`out_oid`) and the legacy SHA-1 buffer | ||||||||||||||||||
| * (`legacy_sha`, sized to `GM_SHA1_SIZE`) are populated. When `GM_OID_RAWSZ` | ||||||||||||||||||
| * exceeds `GM_SHA1_SIZE`, the legacy buffer is zero-padded to maintain | ||||||||||||||||||
| * deterministic contents. Callers must provide non-null pointers. | ||||||||||||||||||
|
Comment on lines
+20
to
+23
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix legacy buffer padding description. The implementation zero-fills the legacy SHA buffer only when - * (`legacy_sha`, sized to `GM_SHA1_SIZE`) are populated. When `GM_OID_RAWSZ`
- * exceeds `GM_SHA1_SIZE`, the legacy buffer is zero-padded to maintain
+ * (`legacy_sha`, sized to `GM_SHA1_SIZE`) are populated. When `GM_OID_RAWSZ`
+ * is smaller than `GM_SHA1_SIZE`, the legacy buffer is zero-padded to maintain📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| */ | ||||||||||||||||||
| GM_NODISCARD gm_result_void_t gm_edge_resolve_blob_identity( | ||||||||||||||||||
| gm_context_t *ctx, | ||||||||||||||||||
| const char *path, | ||||||||||||||||||
| gm_oid_t *out_oid, | ||||||||||||||||||
| uint8_t *legacy_sha); | ||||||||||||||||||
|
|
||||||||||||||||||
| #ifdef __cplusplus | ||||||||||||||||||
| } | ||||||||||||||||||
| #endif | ||||||||||||||||||
|
|
||||||||||||||||||
| #endif /* GITMIND_EDGE_INTERNAL_BLOB_IDENTITY_H */ | ||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* SPDX-License-Identifier: LicenseRef-MIND-UCAL-1.0 */ | ||
| /* © 2025 J. Kirby Ross / Neuroglyph Collective */ | ||
|
|
||
| #ifndef GITMIND_UTIL_OID_H | ||
| #define GITMIND_UTIL_OID_H | ||
|
|
||
| #include <stddef.h> | ||
| #include <stdint.h> | ||
|
|
||
| #include "gitmind/result.h" | ||
| #include "gitmind/types.h" | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
|
|
||
| /** | ||
| * Convert raw bytes to a lowercase hexadecimal string. | ||
| * | ||
| * @param bytes Input byte array | ||
| * @param len Number of bytes to convert | ||
| * @param out Output buffer for the hex string | ||
| * @param out_size Size of the output buffer in bytes | ||
| * @return GM_OK on success, GM_ERR_INVALID_ARGUMENT or GM_ERR_BUFFER_TOO_SMALL otherwise | ||
| */ | ||
| GM_NODISCARD int gm_bytes_to_hex(const uint8_t *bytes, size_t len, | ||
| char *out, size_t out_size); | ||
|
|
||
| /** | ||
| * Convert a gm_oid_t into its hexadecimal string form. | ||
| * | ||
| * @param oid Pointer to the OID to encode | ||
| * @param out Output buffer for the hex string (including null terminator) | ||
| * @param out_size Size of the output buffer in bytes | ||
| * @return GM_OK on success, GM_ERR_INVALID_ARGUMENT or GM_ERR_BUFFER_TOO_SMALL otherwise | ||
| */ | ||
| GM_NODISCARD int gm_oid_to_hex(const gm_oid_t *oid, char *out, size_t out_size); | ||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
|
|
||
| #endif /* GITMIND_UTIL_OID_H */ |
Uh oh!
There was an error while loading. Please reload this page.