Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 11 additions & 25 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
runs-on: ${{ matrix.os }}
if: github.event.inputs.package == 'all' || github.event.inputs.package == 'main' || github.event.inputs.package == 'sdk'
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
Expand All @@ -99,29 +100,15 @@ jobs:
with:
targets: ${{ matrix.target }}

- name: Install musl cross-compilation tools
if: contains(matrix.target, 'linux-musl')
- name: Install musl tools (x86_64)
if: matrix.target == 'x86_64-unknown-linux-musl'
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-musl" ]]; then
sudo apt-get install -y gcc-aarch64-linux-gnu
MUSL_URL="https://musl.cc/aarch64-linux-musl-cross.tgz"
MUSL_ARCHIVE="/tmp/aarch64-linux-musl-cross.tgz"
for attempt in 1 2 3; do
if curl -fL --connect-timeout 20 --max-time 180 --retry 3 --retry-delay 2 --retry-all-errors \
"$MUSL_URL" -o "$MUSL_ARCHIVE"; then
break
fi
if [[ "$attempt" -eq 3 ]]; then
echo "Failed to download aarch64 musl cross-compiler"
exit 1
fi
sleep $((attempt * 5))
done
sudo tar -xzf "$MUSL_ARCHIVE" -C /opt
echo "/opt/aarch64-linux-musl-cross/bin" >> "$GITHUB_PATH"
fi

- name: Install cross (aarch64)
if: matrix.target == 'aarch64-unknown-linux-musl'
uses: taiki-e/install-action@cross

- name: Cache cargo
uses: Swatinem/rust-cache@v2
Expand All @@ -131,12 +118,11 @@ jobs:
- name: Build broker binary
run: |
if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-musl" ]]; then
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc
export CC_aarch64_unknown_linux_musl=aarch64-linux-musl-gcc
RUSTFLAGS="-C target-feature=+crt-static" cross build --release --bin agent-relay-broker --target ${{ matrix.target }}
else
RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --bin agent-relay-broker --target ${{ matrix.target }}
fi
RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --bin agent-relay-broker --target ${{ matrix.target }}
strip target/${{ matrix.target }}/release/agent-relay-broker 2>/dev/null || \
aarch64-linux-musl-strip target/${{ matrix.target }}/release/agent-relay-broker 2>/dev/null || true
strip target/${{ matrix.target }}/release/agent-relay-broker 2>/dev/null || true
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.

🟡 publish.yml aarch64 binary is never stripped due to missing cross-strip tool

The strip command on line 125 runs the host's x86_64 strip against a cross-compiled aarch64 binary, which silently fails (masked by || true). The old code had a fallback to aarch64-linux-musl-strip, and the companion workflow build-broker-binary.yml:51-53 correctly installs binutils-aarch64-linux-gnu and uses aarch64-linux-gnu-strip for the aarch64 case. The publish workflow omits both the package install and the cross-architecture strip invocation, so the aarch64 binary will be published unstripped (larger file size).

Prompt for agents
In .github/workflows/publish.yml, the aarch64 binary strip is ineffective because the host strip cannot process an ARM binary. To fix:

1. Add a step after the 'Install cross (aarch64)' step (around line 111) to install binutils-aarch64-linux-gnu, similar to what build-broker-binary.yml does at line 53:
   - name: Install cross strip tools (aarch64)
     if: matrix.target == 'aarch64-unknown-linux-musl'
     run: sudo apt-get update && sudo apt-get install -y binutils-aarch64-linux-gnu

2. Update the strip line (currently line 125) to use aarch64-linux-gnu-strip for the aarch64 target, keeping the generic strip for other targets. Change the 'Build broker binary' step's strip command to:
   if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-musl" ]]; then
     aarch64-linux-gnu-strip target/${{ matrix.target }}/release/agent-relay-broker 2>/dev/null || true
   else
     strip target/${{ matrix.target }}/release/agent-relay-broker 2>/dev/null || true
   fi

This matches the pattern already used in .github/workflows/build-broker-binary.yml lines 51-66.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.


- name: Copy binary with platform name
run: |
Expand Down
19 changes: 0 additions & 19 deletions .trajectories/active/traj_ygwd7ep8ab1e.json

This file was deleted.

53 changes: 53 additions & 0 deletions .trajectories/completed/2026-03/traj_c8y3gakjeuv8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"id": "traj_c8y3gakjeuv8",
"version": 1,
"task": {
"title": "Fix publish workflow musl.cc timeout for aarch64 broker build"
},
"status": "completed",
"startedAt": "2026-03-04T21:18:27.095Z",
"agents": [
{
"name": "default",
"role": "lead",
"joinedAt": "2026-03-04T21:18:54.262Z"
}
],
"chapters": [
{
"id": "chap_q0j0s48w0c3e",
"title": "Work",
"agentName": "default",
"startedAt": "2026-03-04T21:18:54.262Z",
"events": [
{
"ts": 1772659134263,
"type": "decision",
"content": "Replaced publish workflow aarch64 musl toolchain download from musl.cc with cross-rs: Replaced publish workflow aarch64 musl toolchain download from musl.cc with cross-rs",
"raw": {
"question": "Replaced publish workflow aarch64 musl toolchain download from musl.cc with cross-rs",
"chosen": "Replaced publish workflow aarch64 musl toolchain download from musl.cc with cross-rs",
"alternatives": [],
"reasoning": "musl.cc timeouts cause recurring CI failures; cross uses maintained target container and avoids direct dependency on musl.cc"
},
"significance": "high"
}
],
"endedAt": "2026-03-04T21:18:54.432Z"
}
],
"commits": [],
"filesChanged": [],
"projectId": "/Users/khaliqgant/Projects/agent-workforce/relay",
"tags": [],
"_trace": {
"startRef": "30d6ae6ba1230c5ab41937a5e05e8c3790ad2860",
"endRef": "30d6ae6ba1230c5ab41937a5e05e8c3790ad2860"
},
"completedAt": "2026-03-04T21:18:54.432Z",
"retrospective": {
"summary": "Patched publish.yml build-broker job to use cross for aarch64-unknown-linux-musl, removed musl.cc curl path, and enabled fail-fast=false for broker matrix",
"approach": "Standard approach",
"confidence": 0.95
}
}
31 changes: 31 additions & 0 deletions .trajectories/completed/2026-03/traj_c8y3gakjeuv8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Trajectory: Fix publish workflow musl.cc timeout for aarch64 broker build

> **Status:** ✅ Completed
> **Confidence:** 95%
> **Started:** March 4, 2026 at 01:18 PM
> **Completed:** March 4, 2026 at 01:18 PM

---

## Summary

Patched publish.yml build-broker job to use cross for aarch64-unknown-linux-musl, removed musl.cc curl path, and enabled fail-fast=false for broker matrix

**Approach:** Standard approach

---

## Key Decisions

### Replaced publish workflow aarch64 musl toolchain download from musl.cc with cross-rs
- **Chose:** Replaced publish workflow aarch64 musl toolchain download from musl.cc with cross-rs
- **Reasoning:** musl.cc timeouts cause recurring CI failures; cross uses maintained target container and avoids direct dependency on musl.cc

---

## Chapters

### 1. Work
*Agent: default*

- Replaced publish workflow aarch64 musl toolchain download from musl.cc with cross-rs: Replaced publish workflow aarch64 musl toolchain download from musl.cc with cross-rs
53 changes: 53 additions & 0 deletions .trajectories/completed/2026-03/traj_fxq5ufnzc3k3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"id": "traj_fxq5ufnzc3k3",
"version": 1,
"task": {
"title": "Reduce process-level CLI flake surface by keeping only smoke coverage in index.test"
},
"status": "completed",
"startedAt": "2026-03-04T21:15:49.943Z",
"agents": [
{
"name": "default",
"role": "lead",
"joinedAt": "2026-03-04T21:15:50.135Z"
}
],
"chapters": [
{
"id": "chap_bsx5rxzuy2le",
"title": "Work",
"agentName": "default",
"startedAt": "2026-03-04T21:15:50.135Z",
"events": [
{
"ts": 1772658950135,
"type": "decision",
"content": "Removed broker-dependent subprocess assertions from index.test and relied on command/lib unit tests: Removed broker-dependent subprocess assertions from index.test and relied on command/lib unit tests",
"raw": {
"question": "Removed broker-dependent subprocess assertions from index.test and relied on command/lib unit tests",
"chosen": "Removed broker-dependent subprocess assertions from index.test and relied on command/lib unit tests",
"alternatives": [],
"reasoning": "unit tests already cover status/agents/who/history/read behavior deterministically; subprocess tests were flaky due broker startup timing"
},
"significance": "high"
}
],
"endedAt": "2026-03-04T21:15:50.309Z"
}
],
"commits": [],
"filesChanged": [],
"projectId": "/Users/khaliqgant/Projects/agent-workforce/relay",
"tags": [],
"_trace": {
"startRef": "be51324e0be71d973c950aab4a61b7bf96a0c151",
"endRef": "be51324e0be71d973c950aab4a61b7bf96a0c151"
},
"completedAt": "2026-03-04T21:15:50.309Z",
"retrospective": {
"summary": "Trimmed index.test to version/help plus agents --json smoke; hardened smoke JSON detection against broker log prefixes",
"approach": "Standard approach",
"confidence": 0.94
}
}
31 changes: 31 additions & 0 deletions .trajectories/completed/2026-03/traj_fxq5ufnzc3k3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Trajectory: Reduce process-level CLI flake surface by keeping only smoke coverage in index.test

> **Status:** ✅ Completed
> **Confidence:** 94%
> **Started:** March 4, 2026 at 01:15 PM
> **Completed:** March 4, 2026 at 01:15 PM

---

## Summary

Trimmed index.test to version/help plus agents --json smoke; hardened smoke JSON detection against broker log prefixes

**Approach:** Standard approach

---

## Key Decisions

### Removed broker-dependent subprocess assertions from index.test and relied on command/lib unit tests
- **Chose:** Removed broker-dependent subprocess assertions from index.test and relied on command/lib unit tests
- **Reasoning:** unit tests already cover status/agents/who/history/read behavior deterministically; subprocess tests were flaky due broker startup timing

---

## Chapters

### 1. Work
*Agent: default*

- Removed broker-dependent subprocess assertions from index.test and relied on command/lib unit tests: Removed broker-dependent subprocess assertions from index.test and relied on command/lib unit tests
78 changes: 78 additions & 0 deletions .trajectories/completed/2026-03/traj_ygwd7ep8ab1e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"id": "traj_ygwd7ep8ab1e",
"version": 1,
"task": {
"title": "Stabilize flaky CLI agents --json test timeout"
},
"status": "completed",
"startedAt": "2026-03-04T21:01:07.410Z",
"agents": [
{
"name": "default",
"role": "lead",
"joinedAt": "2026-03-04T21:12:10.243Z"
}
],
"chapters": [
{
"id": "chap_8fpb7wtgaj1m",
"title": "Work",
"agentName": "default",
"startedAt": "2026-03-04T21:12:10.243Z",
"events": [
{
"ts": 1772658730244,
"type": "decision",
"content": "Moved agents/who/history JSON assertions from process-level CLI test to deterministic unit tests: Moved agents/who/history JSON assertions from process-level CLI test to deterministic unit tests",
"raw": {
"question": "Moved agents/who/history JSON assertions from process-level CLI test to deterministic unit tests",
"chosen": "Moved agents/who/history JSON assertions from process-level CLI test to deterministic unit tests",
"alternatives": [],
"reasoning": "direct handler tests avoid broker startup/network timing and remove CI timeout flake while keeping one end-to-end smoke check"
},
"significance": "high"
}
],
"endedAt": "2026-03-04T21:12:10.460Z"
}
],
"commits": [
"be51324e",
"4e2a8934"
],
"filesChanged": [
".github/workflows/build-broker-binary.yml",
".trajectories/active/traj_ygwd7ep8ab1e.json",
".trajectories/index.json",
"CHANGELOG.md",
"package-lock.json",
"package.json",
"packages/acp-bridge/package.json",
"packages/config/package.json",
"packages/hooks/package.json",
"packages/memory/package.json",
"packages/openclaw/package.json",
"packages/policy/package.json",
"packages/sdk-py/pyproject.toml",
"packages/sdk/package.json",
"packages/telemetry/package.json",
"packages/trajectory/package.json",
"packages/user-directory/package.json",
"packages/utils/package.json",
"src/cli/commands/agent-management.ts",
"src/cli/index.test.ts"
],
"projectId": "/Users/khaliqgant/Projects/agent-workforce/relay",
"tags": [],
"_trace": {
"startRef": "2c332bd4bbfdf971c3b424515d62493b0582a53f",
"endRef": "be51324e0be71d973c950aab4a61b7bf96a0c151",
"traceId": "trace_nbs8xyxldw67"
},
"completedAt": "2026-03-04T21:12:10.460Z",
"retrospective": {
"summary": "Added deterministic unit tests for agent-management-listing and messaging history JSON; reduced CLI JSON integration surface to a single agents --json smoke test",
"approach": "Standard approach",
"confidence": 0.93
}
}
38 changes: 38 additions & 0 deletions .trajectories/completed/2026-03/traj_ygwd7ep8ab1e.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Trajectory: Stabilize flaky CLI agents --json test timeout

> **Status:** ✅ Completed
> **Confidence:** 93%
> **Started:** March 4, 2026 at 01:01 PM
> **Completed:** March 4, 2026 at 01:12 PM

---

## Summary

Added deterministic unit tests for agent-management-listing and messaging history JSON; reduced CLI JSON integration surface to a single agents --json smoke test

**Approach:** Standard approach

---

## Key Decisions

### Moved agents/who/history JSON assertions from process-level CLI test to deterministic unit tests
- **Chose:** Moved agents/who/history JSON assertions from process-level CLI test to deterministic unit tests
- **Reasoning:** direct handler tests avoid broker startup/network timing and remove CI timeout flake while keeping one end-to-end smoke check

---

## Chapters

### 1. Work
*Agent: default*

- Moved agents/who/history JSON assertions from process-level CLI test to deterministic unit tests: Moved agents/who/history JSON assertions from process-level CLI test to deterministic unit tests

---

## Artifacts

**Commits:** be51324e, 4e2a8934
**Files changed:** 20
Loading
Loading