fix(ci): scope publish script version sed to package section only#574
Merged
AlexMikhalev merged 1 commit intomainfrom Feb 23, 2026
Merged
fix(ci): scope publish script version sed to package section only#574AlexMikhalev merged 1 commit intomainfrom
AlexMikhalev merged 1 commit intomainfrom
Conversation
The update_versions function replaced ALL lines matching ^version = "..." which corrupted dependency versions in multi-line [dependencies.X] blocks. For example, notify's version "6.1" in terraphim_router was changed to "1.10.0", causing cargo publish to fail with "failed to select a version". Fix: use sed range addressing (0,/pattern/ on GNU, 1,/pattern/ on BSD) to only replace the first occurrence -- the [package] version line. Co-Authored-By: Terraphim AI <noreply@anthropic.com>
AlexMikhalev
pushed a commit
that referenced
this pull request
Apr 15, 2026
Part of Gitea zestic-ai/terraphim-ai #574 (step 2 of three). Adds scripts/update-benchmark-snapshot.sh which extracts mean point estimates from target/criterion/build_index_throughput/{100,1000}/new/ estimates.json and flattens them into benchmark-results/snapshot.json, matching the schema consumed by terraphim.ai at content/data/benchmarks.json. Metrics not yet directly wired to Criterion output (inference_ns, search_latency_ms, graph_footprint_mb, index_throughput_mibps) fall back to the hand-curated values from the 2025-11-11 test report; the snapshot records each metric's source in source.notes for traceability. Extends .github/workflows/performance-benchmarking.yml update-baseline job with a step that runs the script (passing GITHUB_SHA and a workflow_run URL for provenance) and commits snapshot.json alongside baseline.json on main. Validated locally: produces valid JSON (jq empty), 6 metrics, stable across reruns apart from generated_at. Step 3 (cross-repo PR bridge to terraphim.ai) remains deferred. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AlexMikhalev
pushed a commit
that referenced
this pull request
Apr 15, 2026
Part of Gitea zestic-ai/terraphim-ai #574 (step 3 of three). Triggers on push to main when benchmark-results/snapshot.json changes, or via manual dispatch. Checks out terraphim/terraphim.ai using a PAT stored as TERRAPHIM_AI_SITE_TOKEN, copies snapshot.json into content/data/benchmarks.json on a new branch benchmarks/sync-<sha>, and opens a labelled PR against main. Idempotency: compares source and destination with generated_at stripped via jq; exits without opening a PR when only the timestamp has moved. PR body cites the source commit and the terraphim-ai workflow run URL for traceability. Label 'benchmarks' created on terraphim.ai side. Required setup before first run: - Create PAT with contents:write + pull-requests:write on terraphim/terraphim.ai - Add as TERRAPHIM_AI_SITE_TOKEN in this repo's secrets Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AlexMikhalev
pushed a commit
that referenced
this pull request
Apr 16, 2026
The publish-benchmarks-to-site workflow was blocked because it ran on ubuntu-latest and required a GitHub PAT stored as TERRAPHIM_AI_SITE_TOKEN in repo secrets. Every other workflow in this repo (deploy-docs, performance-benchmarking) already solves auth via the self-hosted runner on bigbox plus 1password/load-secrets-action@v2. Changes: - runs-on: ubuntu-latest -> [self-hosted, linux, x64] - Auth via OP_GH_TOKEN from op://TerraphimPlatform/github-site-deploy/credential - 1password/load-secrets-action@v2 injects GH_TOKEN at runtime - Removed TERRAPHIM_AI_SITE_TOKEN secret dependency - Updated actions/checkout from v4 to v6 for consistency Requires one-off manual setup: create 1Password item "github-site-deploy" in TerraphimPlatform vault with a fine-grained GitHub PAT scoped to terraphim/terraphim.ai (contents:write + pull-requests:write). Refs Gitea zestic-ai/terraphim-ai #574 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AlexMikhalev
added a commit
that referenced
this pull request
Apr 25, 2026
The update_versions function replaced ALL lines matching ^version = "..." which corrupted dependency versions in multi-line [dependencies.X] blocks. For example, notify's version "6.1" in terraphim_router was changed to "1.10.0", causing cargo publish to fail with "failed to select a version". Fix: use sed range addressing (0,/pattern/ on GNU, 1,/pattern/ on BSD) to only replace the first occurrence -- the [package] version line. Co-authored-by: Terraphim AI <noreply@anthropic.com>
AlexMikhalev
pushed a commit
that referenced
this pull request
Apr 25, 2026
Part of Gitea zestic-ai/terraphim-ai #574 (step 2 of three). Adds scripts/update-benchmark-snapshot.sh which extracts mean point estimates from target/criterion/build_index_throughput/{100,1000}/new/ estimates.json and flattens them into benchmark-results/snapshot.json, matching the schema consumed by terraphim.ai at content/data/benchmarks.json. Metrics not yet directly wired to Criterion output (inference_ns, search_latency_ms, graph_footprint_mb, index_throughput_mibps) fall back to the hand-curated values from the 2025-11-11 test report; the snapshot records each metric's source in source.notes for traceability. Extends .github/workflows/performance-benchmarking.yml update-baseline job with a step that runs the script (passing GITHUB_SHA and a workflow_run URL for provenance) and commits snapshot.json alongside baseline.json on main. Validated locally: produces valid JSON (jq empty), 6 metrics, stable across reruns apart from generated_at. Step 3 (cross-repo PR bridge to terraphim.ai) remains deferred. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AlexMikhalev
pushed a commit
that referenced
this pull request
Apr 25, 2026
Part of Gitea zestic-ai/terraphim-ai #574 (step 3 of three). Triggers on push to main when benchmark-results/snapshot.json changes, or via manual dispatch. Checks out terraphim/terraphim.ai using a PAT stored as TERRAPHIM_AI_SITE_TOKEN, copies snapshot.json into content/data/benchmarks.json on a new branch benchmarks/sync-<sha>, and opens a labelled PR against main. Idempotency: compares source and destination with generated_at stripped via jq; exits without opening a PR when only the timestamp has moved. PR body cites the source commit and the terraphim-ai workflow run URL for traceability. Label 'benchmarks' created on terraphim.ai side. Required setup before first run: - Create PAT with contents:write + pull-requests:write on terraphim/terraphim.ai - Add as TERRAPHIM_AI_SITE_TOKEN in this repo's secrets Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AlexMikhalev
pushed a commit
that referenced
this pull request
Apr 25, 2026
The publish-benchmarks-to-site workflow was blocked because it ran on ubuntu-latest and required a GitHub PAT stored as TERRAPHIM_AI_SITE_TOKEN in repo secrets. Every other workflow in this repo (deploy-docs, performance-benchmarking) already solves auth via the self-hosted runner on bigbox plus 1password/load-secrets-action@v2. Changes: - runs-on: ubuntu-latest -> [self-hosted, linux, x64] - Auth via OP_GH_TOKEN from op://TerraphimPlatform/github-site-deploy/credential - 1password/load-secrets-action@v2 injects GH_TOKEN at runtime - Removed TERRAPHIM_AI_SITE_TOKEN secret dependency - Updated actions/checkout from v4 to v6 for consistency Requires one-off manual setup: create 1Password item "github-site-deploy" in TerraphimPlatform vault with a fine-grained GitHub PAT scoped to terraphim/terraphim.ai (contents:write + pull-requests:write). Refs Gitea zestic-ai/terraphim-ai #574 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
update_versionsfunction inpublish-crates.shusedsed "s/^version = \".*\"/.../"which replaced all lines starting withversion = "-- including dependency versions under[dependencies.X]sectionsnotify's version from"6.1"to"1.10.0"interraphim_router/Cargo.toml, causingcargo publishto fail withfailed to select a version for the requirement notify = "^1.10.0"0,/pattern/on GNU,1,/pattern/on BSD) to only replace the first occurrence -- the[package]version lineTest plan
sed -i '0,/^version = ".*"/s/.../.../' terraphim_router/Cargo.tomlchanges only line 3 (package version), leavesnotifyversion"6.1"on line 36 untouchedcargo publishpasses forterraphim_routerGenerated with Terraphim AI