Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
7168377
Register archival task category in tdbg (#11587)
tsurdilo Aug 19, 2026
732f7b4
Guard against nil History in AppendRawHistoryNodes (#10309)
mykaul Aug 19, 2026
fb8894c
perf: return TimerSequenceID by value instead of pointer (#11177)
mykaul Aug 19, 2026
7ab5df3
Trace outbound Nexus HTTP requests (#11559)
stephanos Aug 19, 2026
438847b
replication: emit lifecycle error events (#11595)
michaely520 Aug 19, 2026
462de77
tdbg: add per-schedule V1/V2/sentinel status check to schedule migrat…
davidporter-id-au Aug 19, 2026
5b410fa
removed blanket timestamp wrapping (time-skipping fix) (#11635)
feiyang3cat Aug 19, 2026
1cbaf6c
Trace inbound Nexus HTTP requests (#11560)
stephanos Aug 19, 2026
d0924bd
improvements on time-skipping task regeneration (#11404)
feiyang3cat Aug 19, 2026
44ae6d5
Fix poller scaling decisions for backlog tasks and rate-limited queue…
rkannan82 Aug 19, 2026
bfb8142
Fix batch operations targeting paused executions (#11642)
fretz12 Aug 19, 2026
5e43259
Fix data race in UpdateWithStart: read ExecutionState.Status before r…
Lakshaymiddha Aug 19, 2026
6cea9e6
Applies small fixes for chasm nexus operations (#11605)
S15 Aug 19, 2026
7fc5c02
Prevent malformed retry delays from poisoning Nexus completions (#11617)
Quinn-With-Two-Ns Aug 19, 2026
bb09631
edge case fixes for time skipping propagation and fast-forward comple…
feiyang3cat Aug 19, 2026
0ac4aca
Pass the local sub state machine to sanitizeFn on apply (#11646)
xwduan Aug 19, 2026
6963778
fix: floor future action times at generator watermark (#11622)
chaptersix Aug 20, 2026
f1c8590
Add Nexus operation context to handler-side logs (#11663)
stephanos Aug 20, 2026
b1d6efc
Tag Nexus pre-dispatch failure logs (#11664)
stephanos Aug 20, 2026
ba91985
Emit namespace replication lifecycle wide events (#11632)
qyc5937 Aug 20, 2026
612823d
Log outbound queue circuit breaker state changes (#11661)
stephanos Aug 20, 2026
71d375e
Return early from CHASM PollComponent when shard moves off host (#10878)
prathyushpv Aug 20, 2026
e327c06
Update Go lint tooling (#11673)
stephanos Aug 20, 2026
05167ab
Make standalone activity completion callback attachment idempotent af…
Quinn-With-Two-Ns Aug 20, 2026
430968b
Use typed atomic values (#11675)
stephanos Aug 20, 2026
8cadb77
Emit namespace migration workflow lifecycle events (#11658)
michaely520 Aug 20, 2026
abeeabd
Fix activity timeout regeneration after unpause (#11666)
fretz12 Aug 20, 2026
39fc2c4
Emit remote cluster lifecycle wide events (#11672)
qyc5937 Aug 20, 2026
7671628
Adaptive test timeouts via Await (#10417)
stephanos Aug 20, 2026
da890c8
Improve replication applied lifecycle events (#11645)
michaely520 Aug 20, 2026
0425053
[SDK Ergonomics] NEXUS-519: Support Query-backed Nexus Operations (#1…
mavemuri Aug 20, 2026
20e655d
Make all force replication tasks low priority (#11692)
xwduan Aug 20, 2026
2c48aa5
Annotate Nexus spans (#11561)
stephanos Aug 20, 2026
c9b9929
Treat missing Worker Deployment Version as deleted (#11696)
rkannan82 Aug 20, 2026
83235a9
Add helpers for testing exported spans (#11655)
stephanos Aug 21, 2026
24434b1
Use slices.Backward for reverse iteration (#11676)
stephanos Aug 21, 2026
2f3cbad
Tag Nexus completion request logs (#11684)
stephanos Aug 21, 2026
9eadc90
Make UnprocessableTaskError pointer-only (#11678)
stephanos Aug 21, 2026
f6772c5
Refactor NamespaceRateLimitInterceptor with functions to consume N to…
rodrigozhou Aug 21, 2026
f6b60cb
Unify namespace lifecycle wide event names (#11720)
qyc5937 Aug 21, 2026
fc530c1
Add observability for multicursor queue-state resolution loss (#11695)
ratdaddy Aug 21, 2026
ceb1cc1
Validate history pagination branch token against mutable state (#11723)
prathyushpv Aug 21, 2026
6805cae
Return forked branch token from storage layer to OSS so both componen…
akbala Aug 21, 2026
46f0942
Use integer range loops (#11677)
stephanos Aug 24, 2026
19634d3
Reorganize CHASM activity codebase (#11446)
dandavison Aug 24, 2026
adf694f
Reuse test context for namespace setup (#11623)
stephanos Aug 24, 2026
33e9917
Clarify functionality; cleanup testcases (#11693)
chrsmith Aug 24, 2026
fc7b395
Make Nexus link warnings aggregatable (#11685)
stephanos Aug 24, 2026
4fc665f
Tag HSM outbound Nexus call failure logs (#11662)
stephanos Aug 24, 2026
baa0338
Fix build break (#11747)
chrsmith Aug 24, 2026
c1a0869
Reconstruct missing current execution record on replication apply (#1…
jiechenz Aug 24, 2026
3c5aaed
Move CHASM Link and Callback validators into common (#11697)
chrsmith Aug 24, 2026
6d0d534
Add missing Nexus CODEOWNERS rules (#11754)
stephanos Aug 25, 2026
3ba31f2
Add context-aware channel test helpers (#11700)
stephanos Aug 25, 2026
9e63eac
Fix SequentialScheduler test deadlock from bounded test task queue (#…
prathyushpv Aug 25, 2026
5406711
Add replication stream lane wire protocol and receiver-side lane rout…
robholland Aug 25, 2026
5c210f4
Replace errors.As with errors.AsType (#11674)
stephanos Aug 25, 2026
d899928
Add log capture to TestLogger (#11748)
stephanos Aug 25, 2026
92a8402
XDC coverage for parent-child replication edge cases (#11690)
jiechenz Aug 25, 2026
ee5b0d8
Fix batch activity unpause visibility query scope (#11725)
fretz12 Aug 25, 2026
cc4199d
Clean up LRU cache test assertions (#11785)
stephanos Aug 25, 2026
0e6194c
Align CHASM ALLOW_ALL lifecycle with V1 (#11631)
chaptersix Aug 25, 2026
a02e33e
Add version to deletion workflow replication task (#11411)
jiechenz Aug 25, 2026
5340452
Add wide events for parent-child workflow lifecycle debugging (#11707)
jiechenz Aug 25, 2026
30e0884
Keep Version workflow open if delete propagation Activity fails for u…
rkannan82 Aug 26, 2026
109a38e
Add `make lint-code-fast` (#11786)
stephanos Aug 26, 2026
00d0908
Add data race summary to CI report (#11211)
awln-temporal Aug 26, 2026
9309d4a
Improve object leak diagnostics (#11643)
stephanos Aug 26, 2026
b40bba4
Auto-approve test shard salt updates (#11779)
stephanos Aug 26, 2026
871d038
Make the scheduler idle-close deadline monotonic (#11702)
davidporter-id-au Aug 26, 2026
3935794
fix: test coverage: add invariants for every schedulev2 state transit…
davidporter-id-au Aug 26, 2026
5397902
Fix scheduler migration test activity panic (#11803)
davidporter-id-au Aug 26, 2026
a4a452c
Add version labels to missing deployment metric (#11799)
Shivs11 Aug 26, 2026
9ad49ef
Update test shard salt (#11793)
temporal-cicd[bot] Aug 26, 2026
38948f8
Add failure capability to Nexus cancellation requests (#11808)
VegetarianOrc Aug 27, 2026
4d0afa1
Add exhaustive natural XDC buffered event coverage (#11789)
michaely520 Aug 27, 2026
c9fd978
Fix: Schedule scanner false-positives for inactive NS (#11703)
davidporter-id-au Aug 27, 2026
15f3532
Add Worker Deployment and BuildID labels to (workflow,activity) task …
Shivs11 Aug 27, 2026
34c2032
Capture panics in Visibility query converter (#11800)
rodrigozhou Aug 27, 2026
1863fbe
Tag replicator errors by replication task type (#11760)
qyc5937 Aug 27, 2026
c7cd6e2
Stop overriding the global OTEL error handler (#11551)
stephanos Aug 27, 2026
994deca
Fix buffered child XDC test race (#11824)
jiechenz Aug 27, 2026
c2e2215
Resend child workflow async when missing on passive (#11705)
jiechenz Aug 27, 2026
5c2cb12
Add wide events for child workflow resends (#11792)
jiechenz Aug 27, 2026
5aa7a47
Make Nexus log messages aggregatable (#11765)
stephanos Aug 27, 2026
b6dd0ef
Capture panic in ServiceErrorInterceptor (#11813)
rodrigozhou Aug 27, 2026
93a81a9
Re-enable BUFFER_ONE backfill test; drop unsupported memo-only test (…
chaptersix Aug 27, 2026
b0e1e4d
Fix Nexus start-operation retry classification for wrapped service er…
tekkaya Aug 27, 2026
987fb31
Update test shard salt (#11845)
temporal-cicd[bot] Aug 28, 2026
5ed21eb
Preserve pending heartbeat timeout task during replication (#11811)
xwduan Aug 28, 2026
0542039
Handle zombie and orphan workflows on replication create path (#11052)
jiechenz Aug 28, 2026
c044bf1
Documentation for worker command task queue kind (#11648)
rkannan82 Aug 28, 2026
1b7d64e
chore: update GitHub Actions for Node 24 (#11816)
chaptersix Aug 31, 2026
935fdf5
Fix activity operator command metric label collision (#11806)
fretz12 Aug 31, 2026
2526165
Validate schedule inputs and preserve V2 IDs (#11629)
chaptersix Aug 31, 2026
a3ebb10
Programmable grpc fault injection (#9076)
stephanos Aug 31, 2026
47db1ef
Clean up persistence test assertions (#11788)
stephanos Aug 31, 2026
b8c7ef4
Verify Nexus log correlation across hops (#11689)
stephanos Aug 31, 2026
44131b2
Clean up version rule test assertions (#11787)
stephanos Aug 31, 2026
2374d91
feat: Upgades the SDK to v1.48.0 (#11874)
davidporter-id-au Aug 31, 2026
7757511
[Visibility Elasticsearch] Return empty page token when result size i…
rodrigozhou Sep 1, 2026
bde624e
Tag Nexus logs by lifecycle stage (#11757)
stephanos Sep 1, 2026
2a63a6f
Move legacy HSM implementations under history service (#11836)
stephanos Sep 1, 2026
250603e
Annotate worker task spans (#10739)
stephanos Sep 1, 2026
be0318a
Fix FirstWorkflowTaskBackoff Accumulation upon ContinueAsNew (#11839)
yycptt Sep 1, 2026
a5fdb02
Remove priority/fairness metrics handlers (#11875)
dnr Sep 1, 2026
f61c721
Add test-only passive replication hook seams (#11790)
xwduan Sep 1, 2026
a398c80
Restore linting for legacy HSM packages (#11847)
stephanos Sep 1, 2026
30e8ba9
Refactor Nexus dispatch result classification (#11852)
chrsmith Sep 1, 2026
c51464f
Make worker commands timeout and max attempts configurable (#11863)
rkannan82 Sep 1, 2026
a3b9b99
Add single-cluster passive replication test harness (#11887)
xwduan Sep 1, 2026
a108773
Stop retrying timeout error when dispatching worker command (#11851)
rkannan82 Sep 2, 2026
899f401
Avoid refreshing workflow start tasks on later transitions (#11853)
xwduan Sep 2, 2026
acab8b1
Avoid redundant visibility upserts during passive refresh (#11854)
xwduan Sep 2, 2026
446e22d
Dedupe the gRPC status unwrap behind common.GetRPCStatus (#11893)
chrsmith Sep 2, 2026
e4fd5c4
Guard that ValidatorConfig.Validate checks every field (#11898)
chrsmith Sep 2, 2026
45a36d1
Preserve the original workflow start time on RebuildMutableState (#11…
simvlad Sep 2, 2026
e4efc67
Fix matching dropped metric test race (#11849)
Shivs11 Sep 2, 2026
985f195
Fixes to Visibility SQL query converter (#11801)
rodrigozhou Sep 2, 2026
07a9dc3
Extend Copilot code review guidelines (#11904)
stephanos Sep 2, 2026
5618f05
Prevent Terminating an already Canceled SANO (#11897)
chrsmith Sep 2, 2026
a07a006
Replace orphaned child workflows with no worker progress after force …
jiechenz Sep 2, 2026
adb4a6c
Fix child completion recovery after late parent replication (#11868)
jiechenz Sep 2, 2026
cd667da
Sch v1 wf (#11821)
davidporter-id-au Sep 3, 2026
cb650ca
Pin thrift dependency to 0.24 (#11907)
awln-temporal Sep 3, 2026
91b7d77
Add standalone activity dispatch hook (#11798)
fretz12 Sep 3, 2026
055370b
New metric for retry attempts (#11885)
ratdaddy Sep 3, 2026
02f5c1a
Fix mislabeled "system payload" issue (#11906)
chrsmith Sep 3, 2026
1f8442b
Tune default values for dispatching worker command (#11900)
rkannan82 Sep 3, 2026
e8713b6
Fix a race condition that can leave a poll to not get cancelled durin…
rkannan82 Sep 3, 2026
4fe1c3d
Fix workflow update count during state replication (#11911)
xwduan Sep 3, 2026
90c5573
Compare weekly CI report metrics (#11890)
stephanos Sep 4, 2026
2792bc8
Fix SQLite transaction cancellation test race (#11922)
stephanos Sep 4, 2026
eb8f340
Prioritize worker versioning workflows (#11930)
ShahabT Sep 4, 2026
9979699
[Visibility] Fix legacy visibility query converter (#11910)
rodrigozhou Sep 4, 2026
a370f4d
Add improved poller scaling signals (opt-in) (#11909)
veeral-patel Sep 4, 2026
2220587
dynamic partitioning: use probability of AddTask to root partition to…
carlydf Sep 4, 2026
ba0ae78
Deprecate unused single-axis outbound predicate types (#11781)
ratdaddy Sep 4, 2026
ad7b229
[Visibility] Enable unified query converter by default (#11935)
rodrigozhou Sep 4, 2026
95d50ed
Merge sch-readable-execution-phases into main baseline
chaptersix Sep 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .github/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ linters:
- path: ^tools\/.+\.go
linters:
- revive
# These packages remain imported to read and maintain persisted HSM state.
- text: "SA1019: go.temporal.io/server/service/history/hsm/(callbacks|nexusoperations) is deprecated"
linters:
- staticcheck
issues:
max-issues-per-linter: 0
max-same-issues: 0
Expand Down
16 changes: 13 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/chasm/lib/nexusoperation/ @temporalio/act @temporalio/nexus
/chasm/lib/callback/ @temporalio/act @temporalio/nexus
/chasm/lib/workflow/nexus_* @temporalio/act @temporalio/nexus
/chasm/nexus_* @temporalio/oss-foundations @temporalio/act @temporalio/nexus

# Service Clients

Expand All @@ -31,10 +33,11 @@

/common/tasks/ @temporalio/oss-foundations @temporalio/cgs
/common/persistence/ @temporalio/oss-foundations @temporalio/oss-matching @temporalio/cgs
/common/persistence/**/nexus_endpoint* @temporalio/oss-foundations @temporalio/oss-matching @temporalio/nexus

# Components
# Legacy HSM implementations

/components/ @temporalio/act @temporalio/nexus
/service/history/hsm/ @temporalio/act @temporalio/nexus

# Proto Definitions

Expand All @@ -51,6 +54,10 @@
# DB Schema
/schema/**/visibility/ @temporalio/oss-foundations

# Frontend Service

/service/frontend/nexus_* @temporalio/nexus

# History Service

/service/history/archival/ @temporalio/oss-foundations
Expand Down Expand Up @@ -82,7 +89,7 @@
/service/worker/dlq/ @temporalio/oss-foundations

/service/worker/scanner/ @temporalio/oss-foundations @temporalio/oss-matching
/service/worker/scanner/executions/ @temporalio/oss-foundations
/service/worker/scanner/executions/ @temporalio/oss-foundations
/service/worker/scanner/history/ @temporalio/oss-foundations
/service/worker/scanner/build_ids/ @temporalio/oss-matching
/service/worker/scanner/taskqueue/ @temporalio/oss-matching
Expand All @@ -100,3 +107,6 @@
*_mock.go @temporalio/server @temporalio/cgs @temporalio/nexus
*_gen.go @temporalio/server @temporalio/cgs @temporalio/nexus
*.gen.go @temporalio/server @temporalio/cgs @temporalio/nexus

# This generated file has no code owner to allow automated updates by CI.
/tests/testcore/shard_salt.txt
4 changes: 2 additions & 2 deletions .github/actions/post-test-reporting/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ runs:

- name: Upload code coverage to Codecov
if: ${{ !failure() && !cancelled() }}
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
token: ${{ env.CODECOV_TOKEN }}
directory: ./.testoutput
flags: ${{ steps.codecov.outputs.flag }}

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
token: ${{ env.CODECOV_TOKEN }}
directory: ./.testoutput
Expand Down
12 changes: 9 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,30 @@ Apply these patterns when reviewing PRs or suggesting code changes.
- Remove redundant nil checks after you just set a value
- Do not export anything that doesn't need to be exported

## 2. Go Naming Conventions
## 2. Go Conventions

- Don't use `Get` prefix for getters: `func (a *Activity) Store()` not `GetStore()`
- Don't use `Impl` suffix for implementations
- Don't put underscore after `Test` in test names: `TestRetry` not `Test_Retry`
- Avoid stuttering: don't use `ActivityStatus` in package `activity`, just `Status`
- Use `ok` boolean pattern instead of nil checks where idiomatic
- Prefer `cmp.Or` for defaults when zero means "unset"; it returns the first non-zero argument. Use an `if` statement for side-effecting or expensive fallbacks because all arguments are evaluated.

## 3. Testify Suite Correctness and Reliability
## 3. Testing Correctness and Reliability

- Never use `s.T()` in subtests - use the subtest's `t` parameter
- Never use suite assertion methods (`s.NoError`, `s.Equal`) from goroutines - causes panics
- Use `EventuallyWithT` when you need assertions inside eventually blocks, and use that block's `t`
- Use `require.ErrorAs(t, err, &specificErr)` for specific error type checks
- Prefer `require` over `assert` - it's rarely useful to continue a test after a failed assertion
- Prefer table-driven tests over separate `Test*` methods when cases exercise the same behavior. Give each case a descriptive name and run it as a subtest.
- Run independent cases in parallel in plain `t.Run` tests. Testify suites do not support parallel subtests.
- Prefer comparing a function's full result with an expected value over separate `require.Equal` calls for each field. Use `protorequire.ProtoEqual` for proto results and proto fields within non-proto results. Use other field-level assertions only when part of the result is relevant.
- Add comments explaining why `Eventually` is needed (e.g., eventual consistency)
- Do not use single-value type assertions on errors (`err.(*T)`); this panics instead of failing the test when the type doesn't match. Use `errors.As` with a guarded return.
- When launching a goroutine to maintain a precondition for later assertions (e.g., keeping pollers active so a deployment version gets registered), loop until context cancellation rather than running once. A single attempt that times out exits silently, leaving downstream Eventually/propagation waits to hang until their own deadline.
- Never call testify assertions (`s.NoError`, `s.Equal`, `require.NoError`, even `assert.NoError`) inside a `go func()` — if the goroutine outlives the test, the assertion panics the binary with `panic: Fail in goroutine after TestXxx has completed`. Move assertions to the test goroutine or use a buffered error channel.
- Any `<-ch` that isn't inside a `select` with `ctx.Done()` will hang indefinitely if the sender never sends. Always provide a context cancellation fallback.
- Prefer `await.Rcv` and `await.Snd` for blocking channel operations so tests fail on timeout instead of hanging indefinitely.
- Never write to package-level or global variables in tests — parallel tests share the same process; thread values through function parameters instead.
- Never use `time.Sleep` or `time.Since(start) > threshold` to enforce ordering — use channels, `sync.WaitGroup`, or `EventuallyWithT` instead.
- When using `EventuallyWithT` (or similar) to wait for a condition driven by a background goroutine, ensure the goroutine's timeout is longer than the `EventuallyWithT` deadline — if the background op times out first, the condition will never be satisfied and the wait will hang until its own deadline.
Expand Down Expand Up @@ -62,12 +66,14 @@ Apply these patterns when reviewing PRs or suggesting code changes.

- Follow existing patterns: "We have been passing through the frontend request in other libraries. Let's keep the same pattern here"
- Use existing utilities before creating new ones
- Use static logger messages and record all dynamic content in structured tags
- Follow CLI documentation conventions (capitalize proper nouns)
- Match existing metric tag formats (CONSTANT_CASE for enum values)
- Use the same error message style (no punctuation for single sentences)

## 7. Code comments

- Write comments that read like sentences as full sentences, starting with a capital letter and ending with punctuation. Short labels, end-of-line fragments, directives, and `TODO` markers are exempt.
- A comment should be removed if the behavior of the code without the comment should be apparent to a reader familiar with the codebase.
- If the benefit of a comment can be achieved by improving variable/function names then suggest that.
- A comment must not give unnecessary or verbose explanation.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/claude-review-teams.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ jobs:
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ref: ${{ needs.check-review-eligibility.outputs.head_sha }}
path: pr-head
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/optimize-test-sharding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

permissions:
contents: read
pull-requests: write

env:
SALT_FILE: tests/testcore/shard_salt.txt
Expand Down Expand Up @@ -51,8 +52,9 @@ jobs:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}

- name: Create pull request
id: create-pr
run: |
if git diff --quiet; then
if git diff --quiet -- "${{ env.SALT_FILE }}"; then
echo "No changes to shard salt"
exit 0
fi
Expand All @@ -69,10 +71,24 @@ jobs:
git commit -m "Update test shard salt"
git push origin ${{ env.BRANCH }}

gh pr create \
pr_url=$(gh pr create \
--title "Update test shard salt" \
--body "Automatically generated by the optimize-test-sharding workflow."
--body "Automatically generated by the optimize-test-sharding workflow.")

gh pr merge ${{ env.BRANCH }} --auto --squash
echo "pr_url=${pr_url}" >> "${GITHUB_OUTPUT}"
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}

- name: Approve pull request
if: steps.create-pr.outputs.pr_url != ''
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ steps.create-pr.outputs.pr_url }}
run: gh pr review --approve "${PR_URL}"

- name: Enable auto-merge
if: steps.create-pr.outputs.pr_url != ''
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
PR_URL: ${{ steps.create-pr.outputs.pr_url }}
run: gh pr merge "${PR_URL}" --auto --squash
33 changes: 33 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -551,3 +551,36 @@ jobs:
go run ./cmd/tools/ci-notify alert \
--run-id "${{ github.run_id }}" \
--slack-webhook "$SLACK_WEBHOOK"

notify-data-race:
name: Notify Slack on Data Race
# Runs on both passing and failing main runs: the race detector can trip on
# one attempt and pass on a retry, leaving the run green while a data race
# was still recorded in the test-summary artifacts.
if: |
always() &&
github.ref == 'refs/heads/main' &&
(needs.test-status.result == 'success' || needs.test-status.result == 'failure')
needs: test-status
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: "go.mod"
cache: true

- name: Send Slack notification
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
GH_TOKEN: ${{ github.token }}
run: |
go run ./cmd/tools/ci-notify data-race \
--run-id "${{ github.run_id }}" \
--slack-webhook "$SLACK_WEBHOOK"
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: label stale pull requests
uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
with:
days-before-close: -1 # ie disabled
days-before-stale: 120
Expand Down
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ Before starting the implementation of any request, you MUST REVIEW the following
- `/service/worker`: worker service implementation

## Important Commands:
- Linting: `make lint-code`
- Fast Go linting (changed packages): `make lint-code-fast`
- Full Go linting (all packages): `make lint-code`
- Formatting imports: `make fmt-imports`
- Code generation: `make proto`
- Update API proto: `make update-go-api`
Expand Down Expand Up @@ -87,7 +88,7 @@ When requested to perform tasks like fixing bugs, adding features, refactoring,
3. **Implement:** Use the available tools to act on the plan, strictly adhering to the project's established conventions (detailed under 'Core Mandates').
4. **Regenerate:** If necessary, regenerate code based on your changes. If you alter anything annotated with `//go:generate` or in a `.proto` file you will need to do this.
5. **Verify (Tests):** If applicable and feasible, verify the changes using the project's testing procedures. Identify the correct test commands and frameworks by examining 'README' files, build/package configuration (e.g., 'Makefile'), or existing test execution patterns. NEVER assume standard test commands.
6. **Verify (Standards):** VERY IMPORTANT: After making code changes, execute the project-specific build, linting and type-checking commands (`make lint-code`)
6. **Verify (Standards):** VERY IMPORTANT: After making code changes, execute the project-specific build, linting and type-checking commands (`make lint-code-fast` for development)

## Planning
When planning (under 'Software Engineering Tasks'):
Expand Down
38 changes: 32 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ $(STAMPDIR):
$(LOCALBIN):
@mkdir -p $(LOCALBIN)

# When updating the version, update the golangci-lint GHA workflow as well.
.PHONY: golangci-lint
LINT_CODE_TARGETS ?= ./...
GOLANGCI_LINT_BASE_REV ?= $(MAIN_BRANCH)
GOLANGCI_LINT_FIX ?= true
GOLANGCI_LINT_VERSION := v2.9.0
GOLANGCI_LINT_VERSION := v2.13.0
GOLANGCI_LINT := $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION)
$(GOLANGCI_LINT): $(LOCALBIN)
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION))
Expand Down Expand Up @@ -229,7 +229,7 @@ YAMLFMT := $(LOCALBIN)/yamlfmt-$(YAMLFMT_VER)
$(YAMLFMT): | $(LOCALBIN)
$(call go-install-tool,$(YAMLFMT),github.com/google/yamlfmt/cmd/yamlfmt,$(YAMLFMT_VER))

GOIMPORTS_VER := v0.36.0
GOIMPORTS_VER := v0.49.0
GOIMPORTS := $(LOCALBIN)/goimports-$(GOIMPORTS_VER)
$(STAMPDIR)/goimports-$(GOIMPORTS_VER): | $(STAMPDIR) $(LOCALBIN)
$(call go-install-tool,$(GOIMPORTS),golang.org/x/tools/cmd/goimports,$(GOIMPORTS_VER))
Expand Down Expand Up @@ -263,7 +263,7 @@ $(STAMPDIR)/mockgen-$(MOCKGEN_VER): | $(STAMPDIR) $(LOCALBIN)
@touch $@
$(MOCKGEN): $(STAMPDIR)/mockgen-$(MOCKGEN_VER)

STRINGER_VER := v0.36.0
STRINGER_VER := v0.49.0
STRINGER := $(LOCALBIN)/stringer
$(STAMPDIR)/stringer-$(STRINGER_VER): | $(STAMPDIR) $(LOCALBIN)
$(call go-install-tool,$(STRINGER),golang.org/x/tools/cmd/stringer,$(STRINGER_VER))
Expand Down Expand Up @@ -404,10 +404,36 @@ lint-actions: $(ACTIONLINT)
@printf $(COLOR) "Linting GitHub actions..."
@$(ACTIONLINT)

.PHONY: lint-code lint-code-fast
# --new-from-rev filters reported issues _after_ analysis; this target also reduces package inputs _before_ analysis.
lint-code-fast:
@if ! git rev-parse --verify --quiet "$(GOLANGCI_LINT_BASE_REV)^{commit}" >/dev/null; then \
printf $(RED) "GOLANGCI_LINT_BASE_REV=$(GOLANGCI_LINT_BASE_REV) is not a known commit; fetch it or override GOLANGCI_LINT_BASE_REV"; \
exit 1; \
fi
@base=$$(git merge-base HEAD "$(GOLANGCI_LINT_BASE_REV)"); \
targets=$$({ \
git diff --no-renames --name-only "$$base" -- '*.go'; \
git ls-files --others --exclude-standard -- '*.go'; \
} | sed 's|^|./|; s|/[^/]*$$||' | sort -u \
| while read -r dir; do [ -d "$$dir" ] && printf '%s ' "$$dir"; done); \
if [ -z "$$targets" ]; then \
printf $(COLOR) "No changed Go packages to lint."; \
else \
$(MAKE) GOLANGCI_LINT_BASE_REV="$$base" LINT_CODE_TARGETS="$$targets" lint-code; \
fi

lint-code: $(GOLANGCI_LINT) $(ERRORTYPE)
@printf $(COLOR) "Linting code..."
@$(GOLANGCI_LINT) run --verbose --build-tags $(ALL_TEST_TAGS) --timeout 10m --fix=$(GOLANGCI_LINT_FIX) --new-from-rev=$(GOLANGCI_LINT_BASE_REV) --config=.github/.golangci.yml
@go vet -tags $(ALL_TEST_TAGS) -vettool="$(ERRORTYPE)" -style-check=false ./...
@$(GOLANGCI_LINT) run \
--verbose \
--build-tags $(ALL_TEST_TAGS) \
--timeout 10m \
--fix=$(GOLANGCI_LINT_FIX) \
--new-from-rev=$(GOLANGCI_LINT_BASE_REV) \
--config=.github/.golangci.yml \
$(LINT_CODE_TARGETS)
@go vet -tags $(ALL_TEST_TAGS) -vettool="$(ERRORTYPE)" -style-check=false $(LINT_CODE_TARGETS)

lint-yaml: $(YAMLFMT)
@printf $(COLOR) "Checking YAML formatting..."
Expand Down
37 changes: 37 additions & 0 deletions api/historyservice/v1/request_response.go-helpers.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading