Skip to content

Commit 9fa8de4

Browse files
Merge branch 'main' into outlook-search-quote-escape
2 parents f3f42e9 + 78bbc30 commit 9fa8de4

56 files changed

Lines changed: 4720 additions & 1420 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,18 @@
22
"enabledPlugins": {
33
"frontend-design@claude-plugins-official": true,
44
"superpowers@claude-plugins-official": true
5+
},
6+
"hooks": {
7+
"SessionStart": [
8+
{
9+
"matcher": "startup|resume|clear|compact",
10+
"hooks": [
11+
{
12+
"type": "command",
13+
"command": "bash \"$CLAUDE_PROJECT_DIR\"/scripts/cloud_bootstrap.sh"
14+
}
15+
]
16+
}
17+
]
518
}
619
}

.github/workflows/build_tui.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,12 @@ jobs:
245245
EXT=""
246246
if [ "${{ matrix.goos }}" = "windows" ]; then EXT=".exe"; fi
247247
PKG=github.com/amd/gaia/tui/internal/cli
248-
go build -ldflags="-s -w -X ${PKG}.version=${{ github.ref_name }} -X ${PKG}.commit=${{ github.sha }} -X ${PKG}.date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
248+
# The COMMIT's timestamp, never `now` — release_components.yml rebuilds
249+
# these same targets, and two wall-clock stamps guarantee the release
250+
# asset and the hub artifact differ for one version. -trimpath keeps
251+
# the runner's absolute paths out of the binary.
252+
DATE="$(TZ=UTC git show -s --format=%cd --date=format-local:%Y-%m-%dT%H:%M:%SZ HEAD)"
253+
go build -trimpath -ldflags="-s -w -X ${PKG}.version=${{ github.ref_name }} -X ${PKG}.commit=${{ github.sha }} -X ${PKG}.date=${DATE}" \
249254
-o ../bin/gaia-${{ matrix.goos }}-${{ matrix.goarch }}${EXT} \
250255
./cmd/gaia
251256

.github/workflows/publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,15 @@ jobs:
530530
if [ "${{ matrix.goos }}" = "windows" ]; then EXT=".exe"; fi
531531
PKG=github.com/amd/gaia/tui/internal/cli
532532
mkdir -p ../release-assets
533-
go build -ldflags="-s -w \
533+
# The COMMIT's timestamp, never `now` — this is the third workflow that
534+
# builds these same targets, and a wall-clock stamp guarantees all
535+
# three disagree byte-for-byte on one version. -trimpath keeps the
536+
# runner's absolute paths out of the binary.
537+
DATE="$(TZ=UTC git show -s --format=%cd --date=format-local:%Y-%m-%dT%H:%M:%SZ HEAD)"
538+
go build -trimpath -ldflags="-s -w \
534539
-X ${PKG}.version=${{ needs.validate.outputs.tag_name }} \
535540
-X ${PKG}.commit=${{ github.sha }} \
536-
-X ${PKG}.date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
541+
-X ${PKG}.date=${DATE}" \
537542
-o ../release-assets/gaia-${{ matrix.goos }}-${{ matrix.goarch }}${EXT} \
538543
./cmd/gaia
539544

.github/workflows/release_agent_gaia.yml

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@
9797
# ENVIRONMENT secret on `agent-publish` (NOT a repo
9898
# secret) so it is unreadable until the gate is
9999
# approved.
100+
# R2_ACCESS_KEY_ID — R2 S3 credentials + account, from an R2 API token
101+
# R2_SECRET_ACCESS_KEY with Object Read & Write on the hub bucket
102+
# CLOUDFLARE_ACCOUNT_ID (Cloudflare → R2 → Manage R2 API Tokens). REQUIRED
103+
# for every release, not optional: the Linux sidecar
104+
# is past the Worker's request-body cap, so it is
105+
# PUT straight to R2 and published by reference.
106+
# Same ENVIRONMENT-secret placement as above.
100107
# Variables:
101108
# GAIA_HUB_BASE_URL — public Worker origin for downloads + the lock
102109
# baseUrl. Default https://hub.amd-gaia.ai.
@@ -381,8 +388,14 @@ jobs:
381388
# rather than resolved from PyPI — the frozen binary must contain the
382389
# ChatAgent this commit was developed against, not whatever is
383390
# published.
391+
#
392+
# `rag` is required, not optional, in THIS lane: the agent's own
393+
# pyproject leaves it out because a wheel gets it from `gaia init`
394+
# into the active interpreter (#2358), and a frozen binary has no
395+
# interpreter to install into. Without it faiss/pypdf are absent, the
396+
# RAG tools still register, and document Q&A fails on every call.
384397
uv pip install --python .venv-freeze \
385-
-e ".[api]" \
398+
-e ".[api,rag]" \
386399
-e hub/agents/chat/python \
387400
-e hub/agents/gaia/python \
388401
pyinstaller
@@ -625,7 +638,9 @@ jobs:
625638
shell: bash
626639
run: |
627640
set -euo pipefail
628-
uv pip install --system -e ".[api]" -e hub/agents/chat/python -e hub/agents/gaia/python pytest
641+
# Same extras as the freeze env: testing without `rag` would exercise
642+
# a dependency set no released binary ever has.
643+
uv pip install --system -e ".[api,rag]" -e hub/agents/chat/python -e hub/agents/gaia/python pytest
629644
630645
- name: Python tests (hub/agents/gaia/python/tests)
631646
shell: bash
@@ -692,7 +707,11 @@ jobs:
692707
shell: bash
693708
run: |
694709
set -euo pipefail
695-
python -m pip install --upgrade requests pyyaml
710+
# boto3 is not optional here: the Linux sidecar exceeds the Worker's
711+
# request-body cap, so it uploads over the S3 API. Without it the
712+
# publish dies on that artifact with the smaller platforms already
713+
# stored immutably.
714+
python -m pip install --upgrade requests pyyaml boto3
696715
697716
# Re-run of the `version` job's gates AFTER the approval pause: the gate
698717
# can sit for hours, and this job re-checks out the ref. Cheap insurance
@@ -727,18 +746,33 @@ jobs:
727746
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
728747
echo "base_url=${GAIA_HUB_BASE_URL:-https://hub.amd-gaia.ai}/${HUB_PREFIX}/${VERSION}" >> "$GITHUB_OUTPUT"
729748
730-
- name: Assert hub publish token present
749+
- name: Assert publish credentials present
731750
shell: bash
732-
# Secret goes through env (never inlined into the script text) so a
733-
# value with shell metacharacters can't break parsing or defeat masking.
751+
# Secrets go through env (never inlined into the script text) so a value
752+
# with shell metacharacters can't break parsing or defeat masking.
734753
env:
735754
GAIA_HUB_TOKEN: ${{ secrets.GAIA_HUB_TOKEN }}
755+
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
756+
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
757+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
736758
run: |
737759
set -euo pipefail
738760
if [ -z "${GAIA_HUB_TOKEN:-}" ]; then
739761
echo "::error::missing environment secret GAIA_HUB_TOKEN on the agent-publish environment — the Agent Hub Bearer publish token (must match the Worker's PUBLISH_TOKENS). See workers/agent-hub/README.md."
740762
exit 1
741763
fi
764+
# The Linux sidecar is past the Worker's request-body cap, so every
765+
# release needs the direct-to-R2 lane. publish_to_r2.py refuses to
766+
# store anything without these; checking here names all three missing
767+
# secrets at once, before the artifact downloads.
768+
missing=""
769+
for name in R2_ACCESS_KEY_ID R2_SECRET_ACCESS_KEY CLOUDFLARE_ACCOUNT_ID; do
770+
[ -n "${!name:-}" ] || missing="${missing} ${name}"
771+
done
772+
if [ -n "${missing}" ]; then
773+
echo "::error::missing secret(s):${missing}. The Linux sidecar exceeds the Cloudflare Worker request-body cap and uploads straight to R2, so these are required for every release. Create an R2 API token with Object Read & Write (Cloudflare -> R2 -> Manage R2 API Tokens) and add them as ENVIRONMENT secrets on 'agent-publish' (a repo secret is also read, but keep them behind the approval gate). See workers/agent-hub/README.md."
774+
exit 1
775+
fi
742776
743777
- name: Download sidecar artifacts
744778
uses: actions/download-artifact@v8
@@ -841,6 +875,14 @@ jobs:
841875
# hub.amd-gaia.ai (GETs aren't blocked).
842876
GAIA_HUB_PUBLISH_URL: ${{ vars.GAIA_HUB_PUBLISH_URL }}
843877
GAIA_HUB_BASE_URL: ${{ vars.GAIA_HUB_BASE_URL }}
878+
# The sidecar crosses the Worker's request-body cap on Linux
879+
# (measured 120,677,152 bytes with the RAG deps compiled in), so that
880+
# artifact is uploaded straight to R2 over the S3 API and published by
881+
# reference. Without these the publish dies partway through, after the
882+
# smaller platforms have already been stored immutably.
883+
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
884+
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
885+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
844886
run: |
845887
set -euo pipefail
846888
for required in "${README}" "${CHANGELOG}"; do
@@ -874,9 +916,18 @@ jobs:
874916
exit 1
875917
fi
876918
919+
# --strict-immutable: the publisher's lenient default skips an already
920+
# published artifact whose bytes differ and reports the PUBLISHED hash
921+
# in its --summary-out. This lane does not use that summary — the lock
922+
# is rebuilt from the freeze metas below — so a skipped artifact would
923+
# be recorded with this run's local rebuild hash and only blow up two
924+
# steps later, in the fetch-verify, blaming the bytes the hub serves.
925+
# Fail here instead, where the error says to bump the version. Drop
926+
# this flag if the lock is ever switched to --summary-out.
877927
python "${PACKAGING}/publish_to_r2.py" \
878928
--base-url "${GAIA_HUB_PUBLISH_URL:-${GAIA_HUB_BASE_URL:-https://hub.amd-gaia.ai}}" \
879929
--manifest "${MANIFEST}" \
930+
--strict-immutable \
880931
"${doc_args[@]}" \
881932
"${args[@]}"
882933

0 commit comments

Comments
 (0)