Skip to content

feat(stations/notify): wire agent-notify release train - #439

Merged
solomonneas merged 4 commits into
mainfrom
feat/notify-release-train
Jul 22, 2026
Merged

feat(stations/notify): wire agent-notify release train#439
solomonneas merged 4 commits into
mainfrom
feat/notify-release-train

Conversation

@solomonneas

@solomonneas solomonneas commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Publish agent-notify for the five supported platform targets and include all five assets in release attestations.
  • Add agent-notify to component manifests, provenance checks, managed binary resolution, doctor output, version reporting, Windows acceptance, and published-artifact acceptance.
  • Route released notification installs through the pinned release manifest while retaining the source-install fallback.
  • Support rollback from a five-component install to a prior four-component generation without removing external binaries.

Why

PR #433 imported the standalone agent-notify history into stations/notify/. This phase makes the binary part of Brigade's signed component release train and removes go install ...@latest from released installs.

Verification

  • brigade work verify run --target . --command "./scripts/verify" --capture brigade-work
  • Receipt: 20260722-171159-work-verify-3e9324
  • Result: 3,726 passed, 3 skipped, coverage 82.62%, exit 0

Review focus

  • Four-to-five component rollback cleanup and metadata restoration
  • Released install versus source-install routing
  • Asset counts, platform names, checksums, and attestation subjects

Refs #431

Summary by CodeRabbit

  • New Features

    • Added agent-notify as a managed component with native binaries for Linux, macOS, and Windows.
    • Expanded release packaging, manifests, checksums/provenance, and publish/inventory gating to include agent-notify.
    • Added agent-notify version --json validation during install/health and release acceptance.
  • Bug Fixes

    • Improved installation command selection for release vs source modes.
    • Made binary discovery more reliable and strengthened rollback safety for agent-notify upgrades/removals.
  • Tests

    • Expanded publish workflow, native acceptance, and post-install smoke coverage for the new component and strict version metadata.

Co-Authored-By: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR adds agent-notify native binaries to release workflows, manifests, provenance and acceptance checks, managed installation and resolution, notification execution, component smoke tests, Windows validation, and selective rollback handling.

Changes

Agent-notify release integration

Layer / File(s) Summary
Native release assets and acceptance
.github/workflows/*, scripts/*acceptance*, scripts/*manifest*, scripts/windows-native-acceptance.ps1, tests/test_publish_workflow.py, tests/test_published_artifact_acceptance.py, tests/test_ci_workflow.py
Builds five agent-notify binaries, includes them in release inventories and attestations, and validates five components and 25 native assets.
Manifest publication contract
src/brigade/component_manifest.py, src/brigade/templates/components/manifest-v1.json, tests/test_component_manifest.py, tests/test_component_manifest_provenance.py, tests/test_release_manifest_generator.py
Represents agent-notify with an empty asset matrix until published and adds ordered published-component selection plus manifest fixtures.
Managed installation and executable resolution
src/brigade/managed.py, src/brigade/add.py, src/brigade/component_bins.py, src/brigade/notifications_cmd.py, tests/test_managed.py, tests/test_component_bins.py, tests/test_notifications_cmd.py
Selects release or source installation commands and resolves agent-notify through environment overrides, managed paths, legacy paths, and notification command planning.
Published-component setup and smoke validation
src/brigade/component_install.py, tests/test_component_install.py, tests/component_install_helpers.py
Limits setup and smoke operations to published components, adds agent-notify version checks, and verifies unpublished-component omission.
Selective rollback safety
src/brigade/component_install.py, tests/test_component_install.py
Validates rollback platform and component state, restores prior components, and removes only transaction-owned managed binaries.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Build as build-agent-notify-native
  participant Release as assemble-release
  participant Manifest as component-manifest generator
  participant Acceptance as release acceptance
  Build->>Release: provide five platform binaries
  Release->>Manifest: generate component manifest and checksums
  Manifest->>Acceptance: provide five-component release data
  Acceptance->>Acceptance: run asset, health, and version smoke checks
Loading

Possibly related issues

Possibly related PRs

Suggested labels: coderabbit-review

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.79% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly captures the main change: wiring agent-notify into the release train under stations/notify.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/notify-release-train

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

@solomonneas

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds agent-notify to Brigade’s managed component release train. The main changes are:

  • Native release assets for five supported platforms.
  • Manifest, checksum, provenance, and attestation coverage.
  • Managed installation, binary resolution, health, and version reporting.
  • Four-to-five component rollback support.
  • Unix and Windows published-artifact acceptance checks.

Confidence Score: 5/5

This looks safe to merge.

  • Release builds now inject the version, commit, and UTC build date into all five native binaries.
  • Unix and Windows acceptance checks reject placeholder or malformed release metadata.
  • No blocking issue remains in the updated metadata path.

Important Files Changed

Filename Overview
.github/workflows/publish.yml Builds, packages, and attests five native agent-notify assets with release metadata.
scripts/published-artifact-acceptance.py Checks installed agent-notify metadata during Unix artifact acceptance.
scripts/windows-native-acceptance.ps1 Checks managed components and agent-notify release metadata on Windows.
src/brigade/component_install.py Adds published-component setup, smoke checks, and rollback handling for changing component sets.
src/brigade/managed.py Routes agent-notify installation through release setup or the source fallback.

Reviews (7): Last reviewed commit: "test(ci): pin unpublished source compone..." | Re-trigger Greptile

Comment thread .github/workflows/publish.yml Outdated
@solomonneas solomonneas self-assigned this Jul 22, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
.github/workflows/publish.yml (1)

170-171: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low value

Consider persist-credentials: false on the new checkout step.

Static analysis flags this checkout for leaving the GITHUB_TOKEN in .git/config after checkout. This job only uploads release-assets/ (not the workspace/.git dir), so the classic artifact-exfiltration vector doesn't directly apply, but hardening is still a cheap win and matches recommended practice for a job that has no need to perform authenticated git operations.

🔒️ Suggested fix
       - uses: actions/checkout@v5
+        with:
+          persist-credentials: false
       - uses: actions/setup-go@v5
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/publish.yml around lines 170 - 171, Update the checkout
step using actions/checkout@v5 to disable persisted Git credentials by
configuring persist-credentials as false; leave the rest of the workflow
unchanged.

Source: Linters/SAST tools

scripts/windows-native-acceptance.ps1 (2)

541-554: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Minor: normalize output before ConvertFrom-Json, for consistency.

Other JSON-parsing call sites in this script (Get-ComponentReport, Assert-OperatorDoctorReady) pipe through (... | Out-String).Trim() before ConvertFrom-Json to guard against multi-line/array output. The new agent-notify smoke check pipes $agentNotifyVersion directly, which is fine for the expected single-line case but is inconsistent with the rest of the file.

♻️ Suggested tweak
-    try {
-        $agentNotifyPayload = $agentNotifyVersion | ConvertFrom-Json
-    } catch {
+    try {
+        $agentNotifyPayload = ($agentNotifyVersion | Out-String).Trim() | ConvertFrom-Json
+    } catch {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/windows-native-acceptance.ps1` around lines 541 - 554, The
agent-notify smoke check should normalize the output before JSON parsing for
consistency with Get-ComponentReport and Assert-OperatorDoctorReady. Update the
$agentNotifyVersion handling before ConvertFrom-Json to aggregate and trim the
command output, while preserving the existing malformed-JSON and missing-version
validation.

332-332: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract the shared component-id list to avoid duplication.

The five-component array (agent-notify, graphtrail, graphtrail-mcp, miseledger, sessionfind) is now duplicated verbatim in Assert-ReleaseManifestAndAssets (line 332) and Assert-ManagedComponentDigests (line 365). A shared script-level constant would prevent drift if a component is added/removed later.

♻️ Suggested refactor
+$script:KnownComponentIds = @("agent-notify", "graphtrail", "graphtrail-mcp", "miseledger", "sessionfind")
+
 function Assert-ReleaseManifestAndAssets {
     ...
-    foreach ($componentId in @("agent-notify", "graphtrail", "graphtrail-mcp", "miseledger", "sessionfind")) {
+    foreach ($componentId in $script:KnownComponentIds) {

Also applies to: 365-365

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/windows-native-acceptance.ps1` at line 332, Extract the duplicated
five-item component ID array into a shared script-level constant, then update
both Assert-ReleaseManifestAndAssets and Assert-ManagedComponentDigests to
iterate over that constant instead of defining separate arrays.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/publish.yml:
- Around line 170-171: Update the checkout step using actions/checkout@v5 to
disable persisted Git credentials by configuring persist-credentials as false;
leave the rest of the workflow unchanged.

In `@scripts/windows-native-acceptance.ps1`:
- Around line 541-554: The agent-notify smoke check should normalize the output
before JSON parsing for consistency with Get-ComponentReport and
Assert-OperatorDoctorReady. Update the $agentNotifyVersion handling before
ConvertFrom-Json to aggregate and trim the command output, while preserving the
existing malformed-JSON and missing-version validation.
- Line 332: Extract the duplicated five-item component ID array into a shared
script-level constant, then update both Assert-ReleaseManifestAndAssets and
Assert-ManagedComponentDigests to iterate over that constant instead of defining
separate arrays.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b20fa046-9175-43bf-81f6-76da2e741837

📥 Commits

Reviewing files that changed from the base of the PR and between c0e69da and 5e24c3e.

⛔ Files ignored due to path filters (1)
  • docs/component-manifest-v1.schema.json is excluded by !docs/**, !**/docs/**
📒 Files selected for processing (25)
  • .github/workflows/publish.yml
  • scripts/generate_component_manifest.py
  • scripts/published-artifact-acceptance.py
  • scripts/verify_component_manifest_provenance.py
  • scripts/windows-native-acceptance.ps1
  • src/brigade/add.py
  • src/brigade/component_bins.py
  • src/brigade/component_install.py
  • src/brigade/component_manifest.py
  • src/brigade/managed.py
  • src/brigade/notifications_cmd.py
  • src/brigade/templates/components/manifest-v1.json
  • tests/component_install_helpers.py
  • tests/test_add.py
  • tests/test_component_bins.py
  • tests/test_component_install.py
  • tests/test_component_manifest.py
  • tests/test_component_manifest_provenance.py
  • tests/test_component_report.py
  • tests/test_doctor.py
  • tests/test_managed.py
  • tests/test_notifications_cmd.py
  • tests/test_publish_workflow.py
  • tests/test_published_artifact_acceptance.py
  • tests/test_release_manifest_generator.py

Co-Authored-By: Cursor <cursoragent@cursor.com>
@solomonneas

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@solomonneas

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown

Want your agent to iterate on Greptile's feedback? Try greploops.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/test_ci_workflow.py`:
- Around line 536-539: Update the manifest assertions in the test around the
unpublished and published component comprehensions to require that unpublished
equals exactly the set containing only "agent-notify". Preserve the existing
published-component requirement, but ensure any additional component lacking
assets causes the test to fail.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ecc1af9c-18a0-4cfa-b05d-32804556d3f6

📥 Commits

Reviewing files that changed from the base of the PR and between c0e69da and 8970ff0.

⛔ Files ignored due to path filters (1)
  • docs/component-manifest-v1.schema.json is excluded by !docs/**, !**/docs/**
📒 Files selected for processing (26)
  • .github/workflows/publish.yml
  • scripts/generate_component_manifest.py
  • scripts/published-artifact-acceptance.py
  • scripts/verify_component_manifest_provenance.py
  • scripts/windows-native-acceptance.ps1
  • src/brigade/add.py
  • src/brigade/component_bins.py
  • src/brigade/component_install.py
  • src/brigade/component_manifest.py
  • src/brigade/managed.py
  • src/brigade/notifications_cmd.py
  • src/brigade/templates/components/manifest-v1.json
  • tests/component_install_helpers.py
  • tests/test_add.py
  • tests/test_ci_workflow.py
  • tests/test_component_bins.py
  • tests/test_component_install.py
  • tests/test_component_manifest.py
  • tests/test_component_manifest_provenance.py
  • tests/test_component_report.py
  • tests/test_doctor.py
  • tests/test_managed.py
  • tests/test_notifications_cmd.py
  • tests/test_publish_workflow.py
  • tests/test_published_artifact_acceptance.py
  • tests/test_release_manifest_generator.py

Comment thread tests/test_ci_workflow.py
Co-Authored-By: Cursor <cursoragent@cursor.com>
@solomonneas

Copy link
Copy Markdown
Collaborator Author

Follow-up 82287da fixes the Windows PowerShell 5.1 source-compatibility failure from Actions job 89002397885. Empty asset maps are now detected with an array-wrapped PSObject property count, and the unpublished set is computed before setup and reused for health/smoke gates. PyPI mode remains strict. Captured ./scripts/verify is green in receipt 20260722-175123-work-verify-ac7e9a.

@solomonneas

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@solomonneas

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@solomonneas

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@solomonneas

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (2)
scripts/windows-native-acceptance.ps1 (2)

430-449: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Validate the component ID set, not only its count.

Five entries can still omit a required component if another ID is duplicated or unexpected. Assert the report contains each expected ID exactly once before applying skippable-status checks.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/windows-native-acceptance.ps1` around lines 430 - 449, Update the
component validation around $Report.components to verify the expected component
IDs are present exactly once, rather than relying only on Count -eq 5. Reject
duplicate or unexpected IDs before the existing $Skippable status checks, using
the established expected-ID set if available.

476-477: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Parse build_date as a real UTC timestamp.

The regex accepts impossible dates such as 2026-99-99T99:99:99Z, despite this assertion claiming to reject malformed metadata. Use exact date parsing after the nonempty/unknown check.

Proposed fix
-    if (-not $Payload.build_date -or $Payload.build_date -eq "unknown" -or $Payload.build_date -notmatch '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$') {
+    if (-not $Payload.build_date -or $Payload.build_date -eq "unknown") {
         throw "agent-notify build_date must be a UTC timestamp (YYYY-MM-DDTHH:MM:SSZ), not 'unknown'"
     }
+    try {
+        [DateTime]::ParseExact(
+            [string]$Payload.build_date,
+            "yyyy-MM-dd'T'HH:mm:ss'Z'",
+            [System.Globalization.CultureInfo]::InvariantCulture,
+            [System.Globalization.DateTimeStyles]::AssumeUniversal
+        ) | Out-Null
+    }
+    catch {
+        throw "agent-notify build_date must be a valid UTC timestamp (YYYY-MM-DDTHH:MM:SSZ)"
+    }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/windows-native-acceptance.ps1` around lines 476 - 477, Update the
build_date validation in the agent-notify assertion to perform exact UTC
date-time parsing after the existing empty and "unknown" checks, replacing or
supplementing the regex-only validation so impossible dates and times are
rejected while valid YYYY-MM-DDTHH:MM:SSZ values remain accepted.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@scripts/windows-native-acceptance.ps1`:
- Around line 430-449: Update the component validation around $Report.components
to verify the expected component IDs are present exactly once, rather than
relying only on Count -eq 5. Reject duplicate or unexpected IDs before the
existing $Skippable status checks, using the established expected-ID set if
available.
- Around line 476-477: Update the build_date validation in the agent-notify
assertion to perform exact UTC date-time parsing after the existing empty and
"unknown" checks, replacing or supplementing the regex-only validation so
impossible dates and times are rejected while valid YYYY-MM-DDTHH:MM:SSZ values
remain accepted.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d6fe565c-c5d6-433e-8c6f-19f171a7da2e

📥 Commits

Reviewing files that changed from the base of the PR and between 8970ff0 and ef24a2c.

📒 Files selected for processing (2)
  • scripts/windows-native-acceptance.ps1
  • tests/test_ci_workflow.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/test_ci_workflow.py

@solomonneas
solomonneas merged commit e524e80 into main Jul 22, 2026
34 checks passed
@solomonneas
solomonneas deleted the feat/notify-release-train branch July 26, 2026 20:38
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