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
16 changes: 16 additions & 0 deletions .github/workflows/identity-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,19 @@ jobs:
- name: Vet
working-directory: pkgs/identity
run: go vet -tags ${{ matrix.tags }} ./...

# Test (#17783): the module's suite (7 tests in auth/, web/ and
# cmd/ssh/, including the credential-material and JWT log guards)
# was built and vetted but never run. Guard on the suite files
# existing so a missing suite fails loudly instead of `go test`
# reporting a false green (the go-modules-build.yml chat pattern).
- name: Test
working-directory: pkgs/identity
run: |
for f in auth/auth_logging_test.go web/auth_logging_test.go cmd/ssh/layout_test.go cmd/ssh/metrics_test.go cmd/ssh/ssh_logging_test.go; do
if [[ ! -f "$f" ]]; then
echo "pkgs/identity/$f is missing; refusing to report a test pass with no tests."
exit 1
fi
done
go test -tags ${{ matrix.tags }} ./...
77 changes: 77 additions & 0 deletions .github/workflows/placement-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: placement build

# CI tier policy: see .github/ci-policy.md

# Build + test verification for the pkgs/fleet/placement Go module
# (#17785).
#
# pkgs/fleet/placement is a standalone Go module (the fleet placement
# hard-stop / quota / monthly-guard logic of #2732) with 37 tests
# across 11 files, but no workflow referenced it at all: it was not
# built, vetted, tidied, or tested anywhere, so a breaking change
# would rot silently — the exact failure go-modules-build.yml's
# header describes for the small pkgs modules (#342). This workflow
# gives it the same nightly venue as identity-build.yml, plus the
# test run identity's venue was missing.

on:
schedule:
# Nightly instead of on every push to main (Drew, 2026-11-16; see
# .github/ci-policy.md "Nightly main CI").
- cron: "23 7 * * *"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.run_id || github.ref }}
cancel-in-progress: true

jobs:
build:
name: "basic: go build + test (placement)"
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: pkgs/fleet/placement/go.mod
cache-dependency-path: pkgs/fleet/placement/go.sum

- name: Verify go.mod and go.sum are tidy
working-directory: pkgs/fleet/placement
run: |
go mod tidy
if [[ -n "$(git status --short -- go.mod go.sum)" ]]; then
echo "go mod tidy changed go.mod or go.sum; commit the tidy changes."
git diff -- go.mod go.sum
exit 1
fi

- name: Build
working-directory: pkgs/fleet/placement
run: go build ./...

- name: Vet
working-directory: pkgs/fleet/placement
run: go vet ./...

# Guard on the suite files existing so a missing suite fails
# loudly instead of `go test` reporting a false green for a
# package with no test files (the go-modules-build.yml chat
# pattern).
- name: Test
working-directory: pkgs/fleet/placement
run: |
for f in audit_test.go evaluate_test.go hard_stops_test.go hard_stops_writer_test.go monthly_guard_test.go quota_current_test.go quota_current_retained_test.go cmd/placement-hard-stop/main_test.go cmd/placement-record/main_test.go cmd/placement-record/hard_stops_test.go cmd/placement-record/quota_fallback_test.go; do
if [[ ! -f "$f" ]]; then
echo "pkgs/fleet/placement/$f is missing; refusing to report a test pass with no tests."
exit 1
fi
done
go test ./...
24 changes: 24 additions & 0 deletions .github/workflows/pm-stack-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,30 @@ jobs:
done
python3 -m unittest "$@"

# Claimant migration shell runners (#17787): hermetic throwaway-
# Postgres runners for migrations 0026 (#5400) and 0027. Each
# script asserts its own scenarios with ON_ERROR_STOP and prints
# PASS; they were run by nothing. The runners need initdb/pg_ctl/
# psql on PATH, which the runner image keeps under
# /usr/lib/postgresql/*/bin.
- name: Test claimant migration 0026/0027 shell runners (#17787)
run: |
set -euo pipefail
for suite in pm-stack/opencode-claimant/test/test_migration_0026.sh pm-stack/opencode-claimant/test/test_migration_0027.sh; do
if [ ! -f "$suite" ]; then
echo "::error::Missing claimant migration suite file $suite; the migration tests did not run."
exit 1
fi
done
for pgdir in /usr/lib/postgresql/*/bin; do
if [ -x "$pgdir/initdb" ]; then
export PATH="$pgdir:$PATH"
break
fi
done
bash pm-stack/opencode-claimant/test/test_migration_0026.sh
bash pm-stack/opencode-claimant/test/test_migration_0027.sh

# Lane guard: assignee-is-not-a-hold and park-note dedupe checks
# that queue lanes run before parking or commenting (#7616).
- name: Test lane guard
Expand Down
Loading