Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5156724
refactor: preserve submission input bounds across CLI readers #765
Copilot Nov 10, 2026
4ef8941
Merge commit 'af0e648e3109da431539c9fee4d3931615b7c47c' into successo…
Copilot Nov 10, 2026
8265e5b
feat: expose captured checkpoint CLI and HTTP operations #765
Copilot Nov 10, 2026
92d9ccd
test: isolate clean compiled checkpoint recovery source #765
Copilot Nov 10, 2026
f2f84be
test: retain embedded grader docs in clean recovery fixture #765
Copilot Nov 10, 2026
2d4b37d
fix: preserve checkpoint admission diagnostics and deterministic reco…
Copilot Nov 10, 2026
328f703
feat: add protected checkpoint recovery to Lab #765
Copilot Nov 10, 2026
b3d3da7
Merge branch 'successor/765-core-public' into successor/765-checkpoin…
Copilot Nov 10, 2026
ee94c6b
feat: add execution-aware public manifest aggregation core #766
Copilot Nov 10, 2026
7b50d3d
fix: align checkpoint Lab terminal and call-count checks #765
Copilot Nov 10, 2026
602fd0e
fix: preserve bounded aggregate usage and negative controls #766
Copilot Nov 10, 2026
49909c3
fix: preserve checkpoint error observations with incomplete verdicts …
Copilot Nov 10, 2026
1fcfe31
fix: bound historical aggregate usage to wire precision #766
Copilot Nov 10, 2026
27080bb
fix: validate canonical checkpoint completion and decision linkage #765
Copilot Nov 10, 2026
9481eea
fix: retain checkpoint build admission operator guidance #765
Copilot Nov 10, 2026
5b3ea18
fix: require full fresh checkpoint identity admission #765
Copilot Nov 10, 2026
feaed2c
Merge branch 'successor/765-core-public' into successor/765-checkpoin…
Copilot Nov 10, 2026
3ca0884
fix: bind aggregate execution sources and validate client accounting …
Copilot Nov 10, 2026
9a06812
fix: bind Lab resume source to requested checkpoint #765
Copilot Nov 10, 2026
d418e54
test: cover protected HTTP checkpoint reuse denial #765
Copilot Nov 10, 2026
6fc8bb5
Merge branch 'successor/765-core-public' into successor/765-checkpoin…
Copilot Nov 10, 2026
531de0c
fix: preserve aggregate reports when recorded usage exceeds wire limi…
Copilot Nov 10, 2026
934f5bd
fix: retain checkpoint flag causes in operator diagnostics #765
Copilot Nov 10, 2026
aa752cf
fix: bind checkpoint responses to requested action #765
Copilot Nov 10, 2026
a772e37
Merge branch 'successor/765-core-public' into successor/765-checkpoin…
Copilot Nov 10, 2026
90ca587
fix: require resume source for completed publication failures #765
Copilot Nov 10, 2026
95a2550
Merge published core dependency #959 into standalone aggregation #766
Copilot Nov 10, 2026
c7bd212
Merge published Lab dependency #961 into standalone aggregation #766
Copilot Nov 10, 2026
2da0eb0
feat: wire configured aggregate API and Lab #766
Copilot Nov 10, 2026
34e2fd0
Merge published capture fixes #958 into standalone aggregation #766
Copilot Nov 10, 2026
8a5fea4
Merge approved Lab dependency #961 into standalone aggregation #766
Copilot Nov 10, 2026
0e258f1
fix: preserve registered aggregate offline policy #766
Copilot Nov 10, 2026
e71be06
fix: bound standalone aggregate HTTP admission #766
Copilot Nov 10, 2026
2c4c86a
test: check aggregate HTTP resource cleanup #766
Copilot Nov 10, 2026
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
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- **Standalone manifest aggregation (unreleased v0.41 source preview, #766)** -
Aggregate explicit public completed manifest/evidence references without
agents, credential helpers or private worker ownership. Aggregate schema 1.0
retains separate member/manifest/execution-record populations, repeated
executions, compatible views, original failed/cancelled outcomes and explicit
omissions/conflicts. Local CLI/API/Lab composition and canonical JSON exports
distinguish admission completeness from pass/attestation and withhold partial
or cached historical usage. No automatic migration invents execution records,
evidence or billing. See [ordering, compatibility and migration](docs/MANIFEST_AGGREGATION.md).

- **Checkpoint embedding API (unreleased partial #765)** - Recover immutable
before-unit/finalized-unit checkpoints and compatibility-checked restore atop
the attempt core. Finalized restore reuses the original terminal; before-unit
restore rejects a recorded dispatch even without completion, preventing
uncertain execution from silently rerunning. Public CLI/API/Lab and full
production-CLI/platform acceptance remain pending. See
uncertain execution from silently rerunning. Source commands `runner checkpoint
create` and `runner checkpoint resume` emit capture-approved results. Protected
HTTP operations and the source Lab preserve original outcomes, unavailable
progress, and exact JSON exports without raw source inspection. Linux clean-CLI
boundary-kill/fresh-process controls cover offline mock work; full roadmap,
native-platform acceptance, and independent approval remain pending. See
[checkpoint contracts and migration limits](docs/EXECUTION_CHECKPOINTS.md).

- **Logical execution-attempt embedding API (unreleased partial #764)** - Recover
Expand Down
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ adds immutable reservations and explicit verified reuse without changing
`runner run`. Public submission commands and Lab lineage integration remain
pending; this is not available in installed v0.40.1 artifacts.
The [checkpoint embedding preview](docs/EXECUTION_CHECKPOINTS.md) adds compatible
whole-unit recovery; its public CLI/API/Lab integration is also pending.
whole-unit recovery. Its unreleased source CLI adds `runner checkpoint create`
and `runner checkpoint resume`, with protected HTTP create/resume operations.
The source Lab can create/resume checkpoints and export protected results.
Ordered evaluation-level lineage and full platform acceptance remain pending.

**v0.40.0 adds** bounded
runner/text execution, selected AgentV assertion conversion, task-level MCP
Expand Down Expand Up @@ -291,6 +294,26 @@ canonical workflow, target-specific validation steps, and a reusable delegation

## Commands

### `waza aggregate` (unreleased v0.41 source preview)

Aggregate explicit completed public manifests from an existing local immutable
store without starting agents or requiring the original worker:

```bash
waza aggregate --store .waza-artifacts "$DIGEST" -o aggregate.json
waza aggregate --store .waza-artifacts --inputs inputs.json -o qualified.json
```

Input reference pairs, verified manifests and verified execution records are
separate populations. Repeated executions and compatible views are retained;
missing/conflicting inputs remain in emitted reports and exit nonzero.
Complete admission is not a passing task or execution attestation. Historical
usage is unavailable rather than a partial or cached subtotal. Lab's
**Runner** view's **Aggregate completed public manifests** panel exposes composition,
diagnostics and the exact JSON download.
See [worked examples](site/src/content/docs/guides/manifest-aggregation.mdx) and
[ordering, compatibility and migration](docs/MANIFEST_AGGREGATION.md).

### `waza artifact` (unreleased v0.41 source preview)

Publish immutable artifact manifests without executing agents. The opt-in store
Expand Down Expand Up @@ -349,7 +372,7 @@ waza runner run < examples/runner/unit.json

The v0.40.0 release implements `negotiation`, `exact-unit`, `inline.mock-text`,
`terminal-result` and opt-in `inline.copilot-text`.
Only `runner run` starts an engine; each dispatch runs its selected task/trial/
In v0.40.0, only `runner run` starts an engine; each dispatch runs its selected task/trial/
attempt once, without discovery, cache or retries. Admitted receipts include
versioned [logical identities](site/src/content/docs/guides/runner-identities.mdx)
derived from the original captured input, not proof of execution or deduplication.
Expand Down Expand Up @@ -392,6 +415,13 @@ The task entry must be eval-relative, and successful adaptation passes shared
offline admission within the complete 4 MiB emitted-byte limit.
See the [compatibility table and before/after examples](site/src/content/docs/guides/runner-compatibility.mdx).

**Unreleased checkpoint source preview:** `waza runner checkpoint create --store
.waza-artifacts < submission.json` publishes whole-unit checkpoints;
`waza runner checkpoint resume CHECKPOINT_SHA256 --store .waza-artifacts <
submission.json` admits compatible recovery. These commands require a clean
VCS-stamped CLI and a captured submission wrapper, not a bare runner request.
See the [checkpoint workflow and limits](site/src/content/docs/guides/immutable-artifacts.mdx#checkpoint-public-source-preview).

The [local container reference](site/src/content/docs/guides/runner-container.mdx)
keeps the default scratch image mock-only and provides an explicit
`native-reference` target for the exact-unit native Copilot text profile. The
Expand Down
94 changes: 94 additions & 0 deletions cmd/waza/cmd_aggregate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
package main

import (
"errors"
"fmt"
"io"
"os"
"path/filepath"

"github.com/microsoft/waza/internal/artifactmanifest"
"github.com/microsoft/waza/internal/manifestaggregate"
"github.com/spf13/cobra"
)

func newAggregateCommand() *cobra.Command {
var directory, inputPath, outputPath string
cmd := &cobra.Command{
Use: "aggregate [MANIFEST_SHA256...]",
Short: "Aggregate public completed manifests without agents or worker state",
SilenceUsage: true,
Long: "Aggregate explicit references from an existing local immutable store. Optional evidence sidecars qualify recorded categories and execution records. Admission completeness is not a pass verdict or execution attestation. Recorded historical usage is not new SDK billing.",
RunE: func(cmd *cobra.Command, args []string) error {
inputs := make([]manifestaggregate.Input, 0, len(args))
if inputPath != "" {
if len(args) != 0 {
return fmt.Errorf("%w: --inputs and positional digests are mutually exclusive", manifestaggregate.ErrInvalid)
}
data, err := readArtifactFile(inputPath, artifactmanifest.MaxManifestBytes)
if err != nil {
return err
}
inputs, err = manifestaggregate.ParseInputs(data)
if err != nil {
return err
}
} else {
for _, digest := range args {
inputs = append(inputs, manifestaggregate.Input{Manifest: digest})
}
}
inputs, err := manifestaggregate.Normalize(inputs)
if err != nil {
return err
}
sources, closeSources, err := manifestaggregate.OpenLocal(directory)
if err != nil {
return err
}
report, buildErr := manifestaggregate.Build(cmd.Context(), sources, inputs, manifestaggregate.DefaultLimits())
closeErr := closeSources()
if closeErr != nil {
// Do not emit a success-shaped report after a local close failure.
return errors.Join(buildErr, fmt.Errorf("closing aggregate sources: %w", closeErr))
}
if report == nil {
return buildErr
}
wire, err := manifestaggregate.Encode(*report)
if err != nil {
return errors.Join(buildErr, err)
}
if outputPath != "" {
if err := writeAggregateOutput(outputPath, wire); err != nil {
return errors.Join(buildErr, err)
}
}
_, emitErr := cmd.OutOrStdout().Write(append(wire, '\n'))
return errors.Join(buildErr, emitErr)
},
}
cmd.Flags().StringVar(&directory, "store", ".waza-artifacts", "Existing local immutable store (never reads ambient configuration or starts credentials)")
cmd.Flags().StringVar(&inputPath, "inputs", "", "JSON array of manifest_sha256 and optional evidence_sha256 reference pairs")
cmd.Flags().StringVarP(&outputPath, "output", "o", "", "Create a new canonical aggregate JSON file; existing files are never replaced")
return cmd
}

func writeAggregateOutput(path string, wire []byte) error {
root, err := os.OpenRoot(filepath.Dir(path))
if err != nil {
return fmt.Errorf("opening aggregate output parent: %w", err)
}
file, err := root.OpenFile(filepath.Base(path), os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0o600)
if err != nil {
return errors.Join(fmt.Errorf("creating aggregate output: %w", err), root.Close())
}
written, writeErr := file.Write(wire)
if writeErr == nil && written != len(wire) {
writeErr = io.ErrShortWrite
}
if err := errors.Join(writeErr, file.Close(), root.Close()); err != nil {
return fmt.Errorf("aggregate output may be partial at %q: %w", path, err)
}
return nil
}
110 changes: 110 additions & 0 deletions cmd/waza/cmd_aggregate_offline_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
package main

import (
"bytes"
"errors"
"net/http"
"os"
"path/filepath"
"sync/atomic"
"testing"
"time"

"github.com/microsoft/waza/internal/artifactmanifest"
"github.com/microsoft/waza/internal/manifestaggregate"
"github.com/microsoft/waza/internal/testutil/manifestfixture"
"github.com/spf13/cobra"
"github.com/stretchr/testify/require"
)

type aggregateNetworkGuard struct {
calls atomic.Int64
contacted chan struct{}
}

func (g *aggregateNetworkGuard) RoundTrip(*http.Request) (*http.Response, error) {
g.calls.Add(1)
select {
case g.contacted <- struct{}{}:
default:
}
return nil, errors.New("network forbidden in aggregate offline control")
}

func TestAggregateUpdateCheckOnlyExcludesExactCommandAndAncestors(t *testing.T) {
t.Setenv("WAZA_NO_UPDATE_CHECK", "")
root := newRootCommand()
for _, control := range []struct {
name string
want bool
}{{"aggregate", false}, {"models", true}, {"results", true}, {"artifact", true}, {"runner", false}, {"preflight", false}} {
command, _, err := root.Find([]string{control.name})
require.NoError(t, err)
require.Equal(t, control.name, command.Name())
require.Equal(t, control.want, shouldRunUpdateCheck(command, false), control.name)
}
aggregate, _, err := root.Find([]string{"aggregate"})
require.NoError(t, err)
child := &cobra.Command{Use: "child"}
aggregate.AddCommand(child)
require.False(t, shouldRunUpdateCheck(child, false))
require.True(t, shouldRunUpdateCheck(&cobra.Command{Use: "aggregate-other"}, false))
require.True(t, shouldRunUpdateCheck(root, false))
}

func TestAggregateRegisteredRootIsOfflineWithoutUpdateOptOut(t *testing.T) {
directory := t.TempDir()
store := filepath.Join(directory, "store")
require.NoError(t, os.Mkdir(store, 0o700))
backend, err := artifactmanifest.OpenLocal(store)
require.NoError(t, err)
source := manifestfixture.Publish(t, backend, "../../examples/runner/unit.json", nil, manifestfixture.RecordedNonzero(1))
require.NoError(t, backend.Close())
t.Chdir(directory)
require.NoError(t, os.WriteFile(".waza.yaml", []byte("invalid: [ambient configuration must not be read"), 0o600))
home := t.TempDir()
t.Setenv("HOME", home)
t.Setenv("USERPROFILE", home)
t.Setenv("WAZA_NO_UPDATE_CHECK", "")
oldVersion := version
version = "0.1.0"
t.Cleanup(func() { version = oldVersion })
guard := &aggregateNetworkGuard{contacted: make(chan struct{}, 1)}
transport := http.DefaultTransport
http.DefaultTransport = guard
t.Cleanup(func() { http.DefaultTransport = transport })
output := filepath.Join(directory, "saved.json")
root := newRootCommand()
var stdout, stderr bytes.Buffer
root.SetOut(&stdout)
root.SetErr(&stderr)
root.SetArgs([]string{"aggregate", "--store", store, source.Manifest, "-o", output})
require.NoError(t, root.Execute())
require.False(t, root.PersistentFlags().Lookup("no-update-check").Changed)
require.Equal(t, "false", root.PersistentFlags().Lookup("no-update-check").Value.String())
saved, err := os.ReadFile(output)
require.NoError(t, err)
require.Equal(t, append(bytes.Clone(saved), '\n'), stdout.Bytes())
report, err := manifestaggregate.Parse(saved)
require.NoError(t, err)
require.Equal(t, "complete", report.State)
require.Equal(t, 1, report.Counts.VerifiedManifests)
require.Equal(t, source.Manifest, report.Members[0].Manifest)
require.Empty(t, stderr.String())
require.Zero(t, guard.calls.Load(), "registered root must not start its update checker")
require.NoDirExists(t, filepath.Join(home, ".waza"))

// Prove the same unsuppressed root hook can reach the rejecting transport.
control := newRootCommand()
models, _, err := control.Find([]string{"models"})
require.NoError(t, err)
require.True(t, shouldRunUpdateCheck(models, false))
control.PersistentPreRun(models, nil)
select {
case <-guard.contacted:
case <-time.After(5 * time.Second):
t.Fatal("released-version, fresh-home update-check positive control did not reach transport")
}
control.PersistentPostRun(models, nil)
require.EqualValues(t, 1, guard.calls.Load())
}
Loading
Loading