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
2 changes: 1 addition & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: go build ./...

- name: Test
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
run: go test -short -race -coverprofile=coverage.out -covermode=atomic ./...

- name: Upload coverage artifact
uses: actions/upload-artifact@v7
Expand Down
41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,47 @@ listener, signal source) follow the patterns in `pkg/common/` and
- Prefer table-driven tests for multiple input cases.
- Run `go test ./...` and confirm it passes before opening a PR.

For the local race/coverage loop, run from the module root:

```sh
go test -short -race -coverprofile=coverage.out -covermode=atomic ./...
```

`./...` recursively selects packages; `./..` selects the parent directory, not
the module's packages. Short mode keeps race detection and atomic coverage,
but omits these explicitly marked integration/endurance scenarios:

- `TestSessionStoreBoundsAggregateTraceAndBlobGrowth`: 100 worst-case turns.
- `TestSnapshotHistoryTrimsToMarshaledByteLimit`: maximum-size history growth.
- `TestAutonomousCachedCatalogClassifiesCurrentMaterialAuthority`: natural
background permission-revocation/recovery cadence.
- `TestLinkedSettleTakeoverFencesStaleOwnerAwaitingResponse`: real lease expiry.
- `TestLinkedBreakIdleTicksBoundedWrites`: multiple real scheduler ticks.
- `TestLinkedBreakDeletedPodBeforeDetectionAcrossRestartAndLag`: delayed source
ingestion and settling across a durable restart.
- `TestRegistryRenewsTwentyEpochsWithoutBrowserOrResolveRequests`: 20 autonomous
credential-epoch replacements.
- `TestKindFirstListedLaterProducesNoChangesOrBreaks`: autonomous discovery and
journal cycles when a kind becomes served.
- `TestRelayedGenerationKeepsAnUnservedKindUnlistedForTheJournal`: real refresh
window before relaying a newly served kind.
- `TestWorkloadsHTTPRestartDistinguishesWarmingDeniedAndCompleteEmpty`: durable
restart and autonomous recovery through HTTP.
- `TestEnrichedIssuesHTTPTruncatedHistoryRemainsPartial`: autonomous inventory
and permission changes through HTTP enrichment.

Ordinary unit tests, including large graph boundaries, still run in short mode.
Without `-short`, all eleven scenarios remain enabled:

```sh
go test -race -coverprofile=coverage.out -covermode=atomic ./...
```

The local short command does not replace full-suite PR/CI gates. Tests requiring
external services or explicit process harnesses retain their existing prerequisites.
Kubernetes fixture helpers avoid production API pacing; tests of throttling set
their own limiter explicitly.

## Commit messages

Follow Conventional Commits. The git history uses prefixes like:
Expand Down
3 changes: 3 additions & 0 deletions pkg/agent/ai/chat/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,9 @@ func TestSessionStoreTouchIndexReinsertsMissingEntry(t *testing.T) {
}

func TestSessionStoreBoundsAggregateTraceAndBlobGrowth(t *testing.T) {
if testing.Short() {
t.Skip("endurance: persist 100 worst-case turns through aggregate compaction")
}
provider := storage.NewMemory()
store := NewSessionStore(provider, tenancy.DefaultOrgScope(), time.Now)
if _, err := store.Create("session-growth"); err != nil {
Expand Down
Loading
Loading