Skip to content

Pkl round manifests

Pkl is the manifest surface. Go owns execution semantics.

ConcernPath
Schemaconfigs/schema/SearchBenchRound.pkl
Game helpersconfigs/schema/games/code-localization-helpers.pkl
Go loader + validationsrc/searchbench-go/internal/adapters/config/pkl/
Round executionsrc/searchbench-go/internal/app/round/

Proves with: buck2 test //src/searchbench-go:check · after schema edits: buck2 run //src/searchbench-go:pkl_go_types then buck2 test //src/searchbench-go:pkl_go_types_check

From-scratch round

File: configs/rounds/local-ic-vs-jcodemunch/round.pkl

pkl
amends "../../schema/games/code-localization.pkl"
import "../../schema/games/code-localization-helpers.pkl" as game

round = (game.defineFromScratch("round-001")) {
  incumbent = game.jcodemunch()
  challenger = (game.iterativeContext("policies/challenger_policy.py")) {
    selectionPolicy { id = "challenger-policy-round-001" }
  }
  matches = game.lca("py", "dev", 5)
  evaluator = game.fakeEvaluator()
  scoring = game.objective("scoring/localization-objective.pkl")
}
FieldRole
defineFromScratchNew round id and bundle layout
incumbent / challengerPolicies (interfaces) to compare
matchesDataset slice
evaluatorHow matches run (fake = deterministic offline)
evaluator.aggregationHow evaluate_n aggregate evidence is summarized (mean, distributions, optional per-attempt values)
evaluator.determinismBest-effort provider settings (temperature, seed, stream, …) — not attempt count
scoringPkl objective module path

Attempt count for evaluate_n is configured on the Buck target (evaluate_attempts), not in Pkl.

Also see: configs/rounds/fake-local-e2e/round.pkl — same shape with explicit fake backends.

Continuation round

File: configs/rounds/optimize-ic/round.pkl

pkl
amends "../local-ic-vs-jcodemunch/evidence/bundle/games/code-localization/rounds/round-001/continuation.pkl"
import "../../schema/games/code-localization-helpers.pkl" as game

round {
  id = "round-002"
  challenger {
    generate {
      optimizer = game.fakeOptimizer()
      artifactName = "next_challenger_policy.round-002.py"
    }
  }
}

Meaning: amends loads survivor state from the prior bundle’s continuation.pkl; only the delta (new challenger generation) is authored.

Output bundle: configs/rounds/optimize-ic/evidence/bundle/games/code-localization/rounds/round-002/

Flow

text
round.pkl → pkl-go → Go config validation → app/round → bundle/

Do not mutate a completed round’s manifest. New rounds use new ids and bundle directories.

Workspace seed (optional)

In manifests that materialize IC for optimization:

pkl
runtime {
  workspaceSeed {
    provider = "local_path"
    localPath = "src/iterative-context"
  }
}

Details: ../candidate-workspaces.md.

Regenerate Go bindings

Debugging fallback (canonical: Buck targets in development.md):

bash
cd src/searchbench-go
pkl run package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.13.2#/gen.pkl \
  --output-path=. ../../configs/schema/SearchBenchRound.pkl