@tangle-network/agent-eval 0.120.3 → 0.120.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/benchmarks/index.js +2 -2
- package/dist/campaign/index.d.ts +16 -1
- package/dist/campaign/index.js +2 -2
- package/dist/{chunk-3CDFMEMO.js → chunk-7QBFOJ3E.js} +48 -6
- package/dist/{chunk-3CDFMEMO.js.map → chunk-7QBFOJ3E.js.map} +1 -1
- package/dist/{chunk-P5MGQ2FY.js → chunk-ZTJPIIVI.js} +2 -2
- package/dist/contract/index.d.ts +15 -0
- package/dist/contract/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/openapi.json +1 -1
- package/docs/eval-surface-map.md +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-P5MGQ2FY.js.map → chunk-ZTJPIIVI.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to `@tangle-network/agent-eval` and its sibling `agent-eval-
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [0.120.4] — 2026-07-17 — premeasured optimization continuation
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Let `runOptimization()` continue from a complete prior baseline campaign after validating the exact surface, scenario split, seed, replicate count, judge coverage, and retained campaign identity.
|
|
12
|
+
- Preserve the imported campaign and its artifacts for baseline analysis while skipping both a duplicate baseline dispatch and any resumability-cache lookup.
|
|
13
|
+
|
|
7
14
|
## [0.120.3] — 2026-07-16 — complete compatibility package
|
|
8
15
|
|
|
9
16
|
### Fixed
|
package/dist/benchmarks/index.js
CHANGED
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
runBenchmarkAdapter,
|
|
18
18
|
summarizeBenchmarkCampaign
|
|
19
19
|
} from "../chunk-CVJP5TMD.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-ZTJPIIVI.js";
|
|
21
|
+
import "../chunk-7QBFOJ3E.js";
|
|
22
22
|
import "../chunk-SYV364BL.js";
|
|
23
23
|
import "../chunk-3YYRZDON.js";
|
|
24
24
|
import "../chunk-5CVUPHJ4.js";
|
package/dist/campaign/index.d.ts
CHANGED
|
@@ -4122,9 +4122,24 @@ declare function parameterSweepProposer(opts: ParameterSweepProposerOptions): Su
|
|
|
4122
4122
|
* re-score + release gate + optional PR.
|
|
4123
4123
|
*/
|
|
4124
4124
|
|
|
4125
|
+
interface PremeasuredOptimizationBaseline<TArtifact, TScenario extends Scenario> {
|
|
4126
|
+
/** Hash of the exact surface that produced `campaign`. */
|
|
4127
|
+
surfaceHash: string;
|
|
4128
|
+
/** Complete prior measurement reused by identity, including artifactsByPath. */
|
|
4129
|
+
campaign: CampaignResult<TArtifact, TScenario>;
|
|
4130
|
+
}
|
|
4125
4131
|
interface RunOptimizationBaseOptions<TScenario extends Scenario, TArtifact> extends Omit<RunCampaignOptions<TScenario, TArtifact>, 'dispatch'> {
|
|
4126
4132
|
/** Initial mutable surface (typically system prompt or addendum). */
|
|
4127
4133
|
baselineSurface: MutableSurface;
|
|
4134
|
+
/**
|
|
4135
|
+
* Complete prior measurement of `baselineSurface`. When present,
|
|
4136
|
+
* `runOptimization` validates its surface, scenario split, seed, reps, and
|
|
4137
|
+
* normal campaign coverage, then skips the baseline campaign entirely — no
|
|
4138
|
+
* dispatch or resumability-cache lookup. Candidate campaigns still run
|
|
4139
|
+
* normally. Prior spend remains in the imported campaign aggregates and is
|
|
4140
|
+
* not added again to this continuation's CostLedger.
|
|
4141
|
+
*/
|
|
4142
|
+
premeasuredBaseline?: PremeasuredOptimizationBaseline<TArtifact, TScenario>;
|
|
4128
4143
|
/** Dispatcher that takes the CURRENT surface + scenario → artifact. */
|
|
4129
4144
|
dispatchWithSurface: (surface: MutableSurface, scenario: TScenario, ctx: Parameters<RunCampaignOptions<TScenario, TArtifact>['dispatch']>[1]) => Promise<TArtifact>;
|
|
4130
4145
|
/** The candidate-generation strategy. Wrap a population `Mutator` via
|
|
@@ -7451,4 +7466,4 @@ declare function verifyCodeSurface(surface: CodeSurface, worktreeDir?: string):
|
|
|
7451
7466
|
* identity against the checkout at `worktreeRef`. */
|
|
7452
7467
|
declare function resolveWorktreePath(surface: CodeSurface, worktreeDir?: string): string;
|
|
7453
7468
|
|
|
7454
|
-
export { type AcceptedEdit, type AceProposerOptions, type AnalystArtifact, type AnalystScenario, type AnalyzeCrossSurfaceInteractionsInput, type ApplySkillPatchResult, type AxisEvidence, type AxisVerdict, type BuildAnalystSurfaceDispatchOptions, type BuildEvidenceVectorOptions, type BuildLoopProvenanceArgs, type CampaignAggregates, type CampaignArtifactWriter, type CampaignBreakdown, type CampaignCellResult, type CampaignCostMeter, type CampaignResult, type CampaignRunPlan, type CampaignRunPlanCell, type CampaignScenarioIdentity, type CampaignStorage, type CampaignTokenUsage, type CampaignTraceWriter, type CodeSurface, type CodeSurfaceVerification, type CompareProposersOptions, type CompositeProposerOptions, type CostLedgerHandle, type CrossSurfaceAdditionDecision, type CrossSurfaceAdditionRejectionReason, type CrossSurfaceAttemptCompleteness, type CrossSurfaceBestSingleSelection, type CrossSurfaceBootstrapPolicy, type CrossSurfaceCandidate, type CrossSurfaceCandidateComparison, type CrossSurfaceCandidateEvidence, type CrossSurfaceCandidateOutcome, type CrossSurfaceCandidateSummary, type CrossSurfaceComponent, type CrossSurfaceComponentEvidence, type CrossSurfaceCompositionStep, type CrossSurfaceDistribution, type CrossSurfaceEligibility, type CrossSurfaceEvidenceBreakdown, type CrossSurfaceIneligibilityReason, type CrossSurfaceInteractionAwareSelection, type CrossSurfaceInteractionEffect, type CrossSurfaceInteractionPath, type CrossSurfaceInteractionReport, type CrossSurfaceInteractionTask, type CrossSurfaceNaiveStackSelection, type CrossSurfacePairCompatibility, type CrossSurfacePairEvidence, type CrossSurfacePairIncompatibilityReason, type CrossSurfacePairwiseEntry, type CrossSurfaceRankedSingle, type CrossSurfaceRelativeCost, type CrossSurfaceSelectionPolicy, type CrossSurfaceSelections, type CrossSurfaceTaskRow, DEFAULT_POLICY_EDIT_HISTORY_LIMITS, type DefaultProductionGateOptions, type DimensionRegression, type DiscriminationScore, type DispatchContext, type DispatchFn, type EmitLoopProvenanceArgs, type EmitLoopProvenanceResult, type EvalFixture, type EvalFixtureFile, type EvalFixtureLoadOptions, type EvalFixtureRunPlan, type EvalFixtureScenario, type EvalFixtureValidationMode, type EvidenceVector, type EvolutionaryProposerOptions, type FailureModeRecallJudgeOptions, type FapoAttributionSignals, type FapoEntryConfig, type FapoFailureCluster, type FapoOptimizationLevel, type FapoProposerOptions, type FapoReviewInput, type FapoReviewIssue, type FapoReviewResult, type FapoScopeContract, FileSearchLedger, FsLabeledScenarioStore, type FsLabeledScenarioStoreOptions, type Gate, type GateContext, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaProposerConstraints, type GepaProposerOptions, type GitWorktreeAdapterOptions, type Governor, type GovernorContext, type GovernorOp, type HaloProposerOptions, type HeldOutGateOptions, type HeldoutSignificance, type HeldoutSignificanceOptions, type HeuristicGovernorOptions, type JsonPolicyEditTargetSurface, type JsonPrimitive, type JsonValue, type JudgeAggregate, type JudgeConfig, type JudgeDimension, type JudgeScore, type LabelTrust, type LabeledScenarioRecord, type LabeledScenarioSampleArgs, type LabeledScenarioSource, type LabeledScenarioStore, LabeledScenarioStoreError, type LabeledScenarioWrite, Lineage, type LineageEdge, type LineageGraph, type LineageNode, type LineageNodeInput, type LineageStore, type LlmJudgeDimension, type LlmJudgeOptions, type LlmPolicyEditProposerOptions, type LoadEvalFixtureScenariosOptions, type LoopProvenanceArgsFromResult, type LoopProvenanceBackend, type LoopProvenanceCandidate, type LoopProvenanceEvidence, type LoopProvenanceRecord, type MemoryCurationProposerOptions, type MutableSurface, type Mutator, type NeutralizationGateOptions, type ObjectiveSource, type OpenAutoPrOptions, type OpenAutoPrResult, type OpenSearchLedgerOptions, type OptimizationProposer, type OptimizerConfig, type OptimizerEntryConfig, POLICY_EDIT_CANDIDATE_RECORD_SCHEMA, type PairedHoldout, type ParameterCandidate, type ParameterChange, type ParameterSweepProposerOptions, type ParetoParent, type ParetoSignificanceGateOptions, type PlanCampaignRunOptions, type PlanEvalFixtureRunOptions, type PlaybackContext, type PlaybackDriver, type PlaybackStep, type PolicyEditAuthorScenarioRow, type PolicyEditCandidateRecord, type PolicyEditCandidateSummary, type PolicyEditFindingInput, type PolicyEditFindingSource, type PolicyEditHistoryCandidateContext, type PolicyEditHistoryGenerationContext, type PolicyEditHistoryProjectionOptions, type PolicyEditObjective, type PolicyEditOutcomeContext, type PolicyEditProposerOptions, type PowerPreflight, type PowerPreflightOptions, type ProfileDispatchFn, ProfileMatrixError, type ProfileSummary, type PromotionObjective, type PromotionPolicy, type ProposeContext, type ProposePatchesArgs, type ProposedCandidate, type ProposerComparison, type ProposerEntry, type ProposerPairwise, type ProposerScore, type RedactionStatus, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceScenario, type RejectedEdit, type RolloutArgumentDiff, type RolloutArgumentDiffOptions, type RolloutCall, type RunCampaignOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunLineageLoopOptions, type RunLineageLoopResult, type RunLineageLoopSeed, type RunLineageOptions, type RunLineageResult, type RunLineageSeed, type RunLineageStepResult, type RunOptimizationOptions, type RunOptimizationResult, type RunProfileMatrixOptions, type RunProfileMatrixResult, type RunSkillOptOptions, type RunSkillOptResult, SEARCH_LEDGER_SCHEMA, type Scenario, type ScenarioAggregate, type ScenarioRollup, type ScenarioSignal, type ScoreboardRenderOptions, type ScoreboardRow, type ScoreboardSummary, type ScoredRollout, type ScoredSurfaceOutcome, type SearchAccountingAudit, type SearchArtifactRef, type SearchAttemptAccounting, type SearchCandidateDecidedEvent, type SearchCandidateLineage, type SearchCandidateRegisteredEvent, type SearchCandidateSlot, type SearchCandidateSlotClosedEvent, type SearchCandidateSurface, type SearchCompletedEvent, type SearchCostAccounting, type SearchFailureReason, type SearchLedger, type SearchLedgerAppendResult, SearchLedgerConflictError, type SearchLedgerEntry, SearchLedgerError, type SearchLedgerEvent, type SearchLedgerHash, SearchLedgerIntegrityError, type SearchLedgerReplay, type SearchModelIdentity, type SearchOperationKind, type SearchOperationRecordedEvent, type SearchPlan, type SearchPlannedEvent, type SearchPlannedOperation, type SearchPlannedTask, type SearchSourceRef, type SearchSurfaceEffect, type SearchSurfaceEvidence, type SearchSurfaceKind, type SearchTaskAttemptedEvent, type SearchTaskOutcome, type SearchTokenAccounting, type SelectPolicyEditAuthorRowsOptions, type SequentialDecideFn, type SequentialDecideOptions, type SequentialDecision, type SequentialObservation, type SequentialPairedGate, type SequentialPairedGateOptions, type SerializedJsonBudget, type SessionScript, type SingleRunLock, type SingleRunLockOptions, type SkillOptEpochRecord, type SkillOptEvidence, type SkillOptProposer, type SkillOptProposerOptions, type SkillPatch, type SkillPatchOp, SkillPatchParseError, type SkillPatchRejection, type SurfaceProposer, type SurfaceScore, type TraceAnalystProposerOptions, type TraceSpan, type TransientFailureOptions, type UngroundedLiteralReport, type UserStory, type UserStoryVerdict, type Worktree, type WorktreeAdapter, WorktreeAdapterError, aceProposer, acquireSingleRunLock, analyzeCrossSurfaceInteractions, applySkillPatch, assertCampaignDesign, assertCampaignSplitIdentity, assertCodeSurfaceIdentity, assertPolicyEditAuthorContextBudget, buildAnalystSurfaceDispatch, buildEvidenceVector, buildLoopProvenanceRecord, callbackGovernor, campaignBreakdown, campaignMeanComposite, campaignMeasurementDigest, campaignScenarioIdentity, campaignSplitDigest, campaignSplitDigestFromIdentities, classifyUngroundedLiterals, codeSurfaceIdentityMaterial, compareProposers, composeGate, compositeProposer, countSentenceEdits, createReferenceEquivalenceJudge, createRunCostLedger, defaultProductionGate, detectScale, dimensionRegressions, discoverEvalFixtures, emitLoopProvenance, evolutionaryProposer, extractFapoAttributionSignals, extractH2Sections, failureModeRecallJudge, fapoEscalationEntry, fapoProposer, fsCampaignStorage, fsLineageStore, gepaParetoEntry, gepaProposer, gepaReflectionEntry, gitWorktreeAdapter, haloProposer, heldOutGate, heldoutSignificance, heuristicGovernor, inMemoryCampaignStorage, isProposedCandidate, isTransientTransportFailure, labelTrustRank, lineageNodeId, llmJudge, llmPolicyEditProposer, loadEvalFixture, loadEvalFixtureScenarios, loopProvenanceArgsFromResult, loopProvenanceSpans, makePlaybackDispatch, memLineageStore, memoryCurationProposer, neutralizationGate, neutralizeText, openAutoPr, openSearchLedger, pairHoldout, parameterSweepProposer, paretoPolicy, paretoSignificanceGate, parseSkillPatchResponse, patchEditCount, planCampaignRun, planEvalFixtureRun, policyEditProposer, powerPreflight, projectPolicyEditHistory, provenanceRecordPath, provenanceSpansPath, renderScoreboardMarkdown, renderSurfaceDiff, resolveRunDir, resolveWorktreePath, rolloutArgumentDiff, runCampaign, runEval, runImprovementLoop, runLineage, runLineageLoop, runOptimization, runProfileMatrix, runSkillOpt, scoreDiscrimination, scoreUserStory, scoreboardSummary, selectDiscriminative, selectPolicyEditAuthorRows, sequentialDecide, sequentialPairedGate, skillOptEntry, skillOptProposer, surfaceContentHash, surfaceHash, tangleTracesRoot, traceAnalystProposer, userStoryScoreboard, validatePolicyEditCandidateRecord, validateSearchLedgerEvent, verifyCodeSurface, verifyLoopProvenanceRecord };
|
|
7469
|
+
export { type AcceptedEdit, type AceProposerOptions, type AnalystArtifact, type AnalystScenario, type AnalyzeCrossSurfaceInteractionsInput, type ApplySkillPatchResult, type AxisEvidence, type AxisVerdict, type BuildAnalystSurfaceDispatchOptions, type BuildEvidenceVectorOptions, type BuildLoopProvenanceArgs, type CampaignAggregates, type CampaignArtifactWriter, type CampaignBreakdown, type CampaignCellResult, type CampaignCostMeter, type CampaignResult, type CampaignRunPlan, type CampaignRunPlanCell, type CampaignScenarioIdentity, type CampaignStorage, type CampaignTokenUsage, type CampaignTraceWriter, type CodeSurface, type CodeSurfaceVerification, type CompareProposersOptions, type CompositeProposerOptions, type CostLedgerHandle, type CrossSurfaceAdditionDecision, type CrossSurfaceAdditionRejectionReason, type CrossSurfaceAttemptCompleteness, type CrossSurfaceBestSingleSelection, type CrossSurfaceBootstrapPolicy, type CrossSurfaceCandidate, type CrossSurfaceCandidateComparison, type CrossSurfaceCandidateEvidence, type CrossSurfaceCandidateOutcome, type CrossSurfaceCandidateSummary, type CrossSurfaceComponent, type CrossSurfaceComponentEvidence, type CrossSurfaceCompositionStep, type CrossSurfaceDistribution, type CrossSurfaceEligibility, type CrossSurfaceEvidenceBreakdown, type CrossSurfaceIneligibilityReason, type CrossSurfaceInteractionAwareSelection, type CrossSurfaceInteractionEffect, type CrossSurfaceInteractionPath, type CrossSurfaceInteractionReport, type CrossSurfaceInteractionTask, type CrossSurfaceNaiveStackSelection, type CrossSurfacePairCompatibility, type CrossSurfacePairEvidence, type CrossSurfacePairIncompatibilityReason, type CrossSurfacePairwiseEntry, type CrossSurfaceRankedSingle, type CrossSurfaceRelativeCost, type CrossSurfaceSelectionPolicy, type CrossSurfaceSelections, type CrossSurfaceTaskRow, DEFAULT_POLICY_EDIT_HISTORY_LIMITS, type DefaultProductionGateOptions, type DimensionRegression, type DiscriminationScore, type DispatchContext, type DispatchFn, type EmitLoopProvenanceArgs, type EmitLoopProvenanceResult, type EvalFixture, type EvalFixtureFile, type EvalFixtureLoadOptions, type EvalFixtureRunPlan, type EvalFixtureScenario, type EvalFixtureValidationMode, type EvidenceVector, type EvolutionaryProposerOptions, type FailureModeRecallJudgeOptions, type FapoAttributionSignals, type FapoEntryConfig, type FapoFailureCluster, type FapoOptimizationLevel, type FapoProposerOptions, type FapoReviewInput, type FapoReviewIssue, type FapoReviewResult, type FapoScopeContract, FileSearchLedger, FsLabeledScenarioStore, type FsLabeledScenarioStoreOptions, type Gate, type GateContext, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaProposerConstraints, type GepaProposerOptions, type GitWorktreeAdapterOptions, type Governor, type GovernorContext, type GovernorOp, type HaloProposerOptions, type HeldOutGateOptions, type HeldoutSignificance, type HeldoutSignificanceOptions, type HeuristicGovernorOptions, type JsonPolicyEditTargetSurface, type JsonPrimitive, type JsonValue, type JudgeAggregate, type JudgeConfig, type JudgeDimension, type JudgeScore, type LabelTrust, type LabeledScenarioRecord, type LabeledScenarioSampleArgs, type LabeledScenarioSource, type LabeledScenarioStore, LabeledScenarioStoreError, type LabeledScenarioWrite, Lineage, type LineageEdge, type LineageGraph, type LineageNode, type LineageNodeInput, type LineageStore, type LlmJudgeDimension, type LlmJudgeOptions, type LlmPolicyEditProposerOptions, type LoadEvalFixtureScenariosOptions, type LoopProvenanceArgsFromResult, type LoopProvenanceBackend, type LoopProvenanceCandidate, type LoopProvenanceEvidence, type LoopProvenanceRecord, type MemoryCurationProposerOptions, type MutableSurface, type Mutator, type NeutralizationGateOptions, type ObjectiveSource, type OpenAutoPrOptions, type OpenAutoPrResult, type OpenSearchLedgerOptions, type OptimizationProposer, type OptimizerConfig, type OptimizerEntryConfig, POLICY_EDIT_CANDIDATE_RECORD_SCHEMA, type PairedHoldout, type ParameterCandidate, type ParameterChange, type ParameterSweepProposerOptions, type ParetoParent, type ParetoSignificanceGateOptions, type PlanCampaignRunOptions, type PlanEvalFixtureRunOptions, type PlaybackContext, type PlaybackDriver, type PlaybackStep, type PolicyEditAuthorScenarioRow, type PolicyEditCandidateRecord, type PolicyEditCandidateSummary, type PolicyEditFindingInput, type PolicyEditFindingSource, type PolicyEditHistoryCandidateContext, type PolicyEditHistoryGenerationContext, type PolicyEditHistoryProjectionOptions, type PolicyEditObjective, type PolicyEditOutcomeContext, type PolicyEditProposerOptions, type PowerPreflight, type PowerPreflightOptions, type PremeasuredOptimizationBaseline, type ProfileDispatchFn, ProfileMatrixError, type ProfileSummary, type PromotionObjective, type PromotionPolicy, type ProposeContext, type ProposePatchesArgs, type ProposedCandidate, type ProposerComparison, type ProposerEntry, type ProposerPairwise, type ProposerScore, type RedactionStatus, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceScenario, type RejectedEdit, type RolloutArgumentDiff, type RolloutArgumentDiffOptions, type RolloutCall, type RunCampaignOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunLineageLoopOptions, type RunLineageLoopResult, type RunLineageLoopSeed, type RunLineageOptions, type RunLineageResult, type RunLineageSeed, type RunLineageStepResult, type RunOptimizationOptions, type RunOptimizationResult, type RunProfileMatrixOptions, type RunProfileMatrixResult, type RunSkillOptOptions, type RunSkillOptResult, SEARCH_LEDGER_SCHEMA, type Scenario, type ScenarioAggregate, type ScenarioRollup, type ScenarioSignal, type ScoreboardRenderOptions, type ScoreboardRow, type ScoreboardSummary, type ScoredRollout, type ScoredSurfaceOutcome, type SearchAccountingAudit, type SearchArtifactRef, type SearchAttemptAccounting, type SearchCandidateDecidedEvent, type SearchCandidateLineage, type SearchCandidateRegisteredEvent, type SearchCandidateSlot, type SearchCandidateSlotClosedEvent, type SearchCandidateSurface, type SearchCompletedEvent, type SearchCostAccounting, type SearchFailureReason, type SearchLedger, type SearchLedgerAppendResult, SearchLedgerConflictError, type SearchLedgerEntry, SearchLedgerError, type SearchLedgerEvent, type SearchLedgerHash, SearchLedgerIntegrityError, type SearchLedgerReplay, type SearchModelIdentity, type SearchOperationKind, type SearchOperationRecordedEvent, type SearchPlan, type SearchPlannedEvent, type SearchPlannedOperation, type SearchPlannedTask, type SearchSourceRef, type SearchSurfaceEffect, type SearchSurfaceEvidence, type SearchSurfaceKind, type SearchTaskAttemptedEvent, type SearchTaskOutcome, type SearchTokenAccounting, type SelectPolicyEditAuthorRowsOptions, type SequentialDecideFn, type SequentialDecideOptions, type SequentialDecision, type SequentialObservation, type SequentialPairedGate, type SequentialPairedGateOptions, type SerializedJsonBudget, type SessionScript, type SingleRunLock, type SingleRunLockOptions, type SkillOptEpochRecord, type SkillOptEvidence, type SkillOptProposer, type SkillOptProposerOptions, type SkillPatch, type SkillPatchOp, SkillPatchParseError, type SkillPatchRejection, type SurfaceProposer, type SurfaceScore, type TraceAnalystProposerOptions, type TraceSpan, type TransientFailureOptions, type UngroundedLiteralReport, type UserStory, type UserStoryVerdict, type Worktree, type WorktreeAdapter, WorktreeAdapterError, aceProposer, acquireSingleRunLock, analyzeCrossSurfaceInteractions, applySkillPatch, assertCampaignDesign, assertCampaignSplitIdentity, assertCodeSurfaceIdentity, assertPolicyEditAuthorContextBudget, buildAnalystSurfaceDispatch, buildEvidenceVector, buildLoopProvenanceRecord, callbackGovernor, campaignBreakdown, campaignMeanComposite, campaignMeasurementDigest, campaignScenarioIdentity, campaignSplitDigest, campaignSplitDigestFromIdentities, classifyUngroundedLiterals, codeSurfaceIdentityMaterial, compareProposers, composeGate, compositeProposer, countSentenceEdits, createReferenceEquivalenceJudge, createRunCostLedger, defaultProductionGate, detectScale, dimensionRegressions, discoverEvalFixtures, emitLoopProvenance, evolutionaryProposer, extractFapoAttributionSignals, extractH2Sections, failureModeRecallJudge, fapoEscalationEntry, fapoProposer, fsCampaignStorage, fsLineageStore, gepaParetoEntry, gepaProposer, gepaReflectionEntry, gitWorktreeAdapter, haloProposer, heldOutGate, heldoutSignificance, heuristicGovernor, inMemoryCampaignStorage, isProposedCandidate, isTransientTransportFailure, labelTrustRank, lineageNodeId, llmJudge, llmPolicyEditProposer, loadEvalFixture, loadEvalFixtureScenarios, loopProvenanceArgsFromResult, loopProvenanceSpans, makePlaybackDispatch, memLineageStore, memoryCurationProposer, neutralizationGate, neutralizeText, openAutoPr, openSearchLedger, pairHoldout, parameterSweepProposer, paretoPolicy, paretoSignificanceGate, parseSkillPatchResponse, patchEditCount, planCampaignRun, planEvalFixtureRun, policyEditProposer, powerPreflight, projectPolicyEditHistory, provenanceRecordPath, provenanceSpansPath, renderScoreboardMarkdown, renderSurfaceDiff, resolveRunDir, resolveWorktreePath, rolloutArgumentDiff, runCampaign, runEval, runImprovementLoop, runLineage, runLineageLoop, runOptimization, runProfileMatrix, runSkillOpt, scoreDiscrimination, scoreUserStory, scoreboardSummary, selectDiscriminative, selectPolicyEditAuthorRows, sequentialDecide, sequentialPairedGate, skillOptEntry, skillOptProposer, surfaceContentHash, surfaceHash, tangleTracesRoot, traceAnalystProposer, userStoryScoreboard, validatePolicyEditCandidateRecord, validateSearchLedgerEvent, verifyCodeSurface, verifyLoopProvenanceRecord };
|
package/dist/campaign/index.js
CHANGED
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
userStoryScoreboard,
|
|
67
67
|
validateSearchLedgerEvent,
|
|
68
68
|
verifyCodeSurface
|
|
69
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-ZTJPIIVI.js";
|
|
70
70
|
import {
|
|
71
71
|
assertCodeSurfaceIdentity,
|
|
72
72
|
buildEvidenceVector,
|
|
@@ -106,7 +106,7 @@ import {
|
|
|
106
106
|
surfaceContentHash,
|
|
107
107
|
surfaceHash,
|
|
108
108
|
verifyLoopProvenanceRecord
|
|
109
|
-
} from "../chunk-
|
|
109
|
+
} from "../chunk-7QBFOJ3E.js";
|
|
110
110
|
import {
|
|
111
111
|
SearchLedgerConflictError,
|
|
112
112
|
SearchLedgerError,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertCampaignSplitIdentity,
|
|
3
3
|
campaignCoverage,
|
|
4
|
+
campaignSplitDigest,
|
|
4
5
|
canonicalJson,
|
|
5
6
|
contentHash,
|
|
6
7
|
createRunCostLedger,
|
|
@@ -2796,23 +2797,32 @@ async function runOptimization(opts) {
|
|
|
2796
2797
|
"runOptimization: promoteTopK must be 1 because the loop has one global incumbent"
|
|
2797
2798
|
);
|
|
2798
2799
|
}
|
|
2799
|
-
const
|
|
2800
|
+
const requireJudgeScore = (opts.judges?.length ?? 0) > 0;
|
|
2801
|
+
const reps = opts.reps ?? 1;
|
|
2802
|
+
const premeasuredBaseline = opts.premeasuredBaseline;
|
|
2803
|
+
const baselineCampaign = premeasuredBaseline ? validatedPremeasuredBaseline({
|
|
2804
|
+
input: premeasuredBaseline,
|
|
2805
|
+
baselineSurface: opts.baselineSurface,
|
|
2806
|
+
scenarios: opts.scenarios,
|
|
2807
|
+
reps,
|
|
2808
|
+
seed: opts.seed ?? 42
|
|
2809
|
+
}) : await runCampaign({
|
|
2800
2810
|
...opts,
|
|
2801
2811
|
costLedger,
|
|
2802
2812
|
costPhase: "search.baseline",
|
|
2803
2813
|
dispatch: (scenario, ctx) => opts.dispatchWithSurface(opts.baselineSurface, scenario, ctx),
|
|
2804
2814
|
runDir: `${opts.runDir}/baseline`
|
|
2805
2815
|
});
|
|
2806
|
-
const requireJudgeScore = (opts.judges?.length ?? 0) > 0;
|
|
2807
2816
|
const baselineCoverage = campaignCoverage(
|
|
2808
2817
|
baselineCampaign.cells,
|
|
2809
2818
|
opts.scenarios,
|
|
2810
|
-
|
|
2819
|
+
reps,
|
|
2811
2820
|
requireJudgeScore
|
|
2812
2821
|
);
|
|
2813
2822
|
if (!baselineCoverage.complete) {
|
|
2823
|
+
const label = opts.premeasuredBaseline ? "premeasured baseline" : "baseline";
|
|
2814
2824
|
throw new Error(
|
|
2815
|
-
`runOptimization:
|
|
2825
|
+
`runOptimization: ${label} is incomplete (${baselineCoverage.scorableCellIds.length}/${baselineCoverage.expectedCellIds.length} designed cells scorable) \u2014 ${formatCoverageFailures(baselineCoverage)}. Refusing to optimize against an incomplete incumbent.`
|
|
2816
2826
|
);
|
|
2817
2827
|
}
|
|
2818
2828
|
const generations = [];
|
|
@@ -2836,7 +2846,7 @@ async function runOptimization(opts) {
|
|
|
2836
2846
|
if (opts.analyzeGeneration && opts.maxGenerations > 0 && baselineCampaign.cells.length > 0) {
|
|
2837
2847
|
const fresh = await opts.analyzeGeneration({
|
|
2838
2848
|
generation: -1,
|
|
2839
|
-
runDir:
|
|
2849
|
+
runDir: baselineCampaign.runDir,
|
|
2840
2850
|
candidates: [
|
|
2841
2851
|
{ surfaceHash: winnerSurfaceHash, campaign: baselineCampaign, composite: winnerComposite }
|
|
2842
2852
|
],
|
|
@@ -2987,6 +2997,38 @@ async function runOptimization(opts) {
|
|
|
2987
2997
|
cost: costLedger.summary()
|
|
2988
2998
|
};
|
|
2989
2999
|
}
|
|
3000
|
+
function validatedPremeasuredBaseline(args) {
|
|
3001
|
+
const { input } = args;
|
|
3002
|
+
if (input.surfaceHash !== surfaceHash(args.baselineSurface)) {
|
|
3003
|
+
throw new Error(
|
|
3004
|
+
"runOptimization: premeasured baseline surface hash does not match baselineSurface"
|
|
3005
|
+
);
|
|
3006
|
+
}
|
|
3007
|
+
const campaign = input.campaign;
|
|
3008
|
+
if (campaign.reps !== args.reps) {
|
|
3009
|
+
throw new Error(
|
|
3010
|
+
`runOptimization: premeasured baseline reps ${campaign.reps} do not match requested reps ${args.reps}`
|
|
3011
|
+
);
|
|
3012
|
+
}
|
|
3013
|
+
if (campaign.seed !== args.seed) {
|
|
3014
|
+
throw new Error(
|
|
3015
|
+
`runOptimization: premeasured baseline seed ${campaign.seed} does not match requested seed ${args.seed}`
|
|
3016
|
+
);
|
|
3017
|
+
}
|
|
3018
|
+
try {
|
|
3019
|
+
assertCampaignSplitIdentity(campaign.scenarios, campaign.reps, campaign.splitDigest);
|
|
3020
|
+
} catch (error) {
|
|
3021
|
+
throw new Error(
|
|
3022
|
+
`runOptimization: premeasured baseline has an invalid retained split identity \u2014 ${error instanceof Error ? error.message : String(error)}`
|
|
3023
|
+
);
|
|
3024
|
+
}
|
|
3025
|
+
if (campaign.splitDigest !== campaignSplitDigest(args.scenarios, args.reps)) {
|
|
3026
|
+
throw new Error(
|
|
3027
|
+
"runOptimization: premeasured baseline split does not match the requested scenarios"
|
|
3028
|
+
);
|
|
3029
|
+
}
|
|
3030
|
+
return campaign;
|
|
3031
|
+
}
|
|
2990
3032
|
function toParetoParent(surface, hash, campaign, generation, label, rationale) {
|
|
2991
3033
|
const objectives = {};
|
|
2992
3034
|
for (const { scenarioId, composite } of campaignBreakdown(campaign).scenarios) {
|
|
@@ -3875,4 +3917,4 @@ export {
|
|
|
3875
3917
|
provenanceSpansPath,
|
|
3876
3918
|
emitLoopProvenance
|
|
3877
3919
|
};
|
|
3878
|
-
//# sourceMappingURL=chunk-
|
|
3920
|
+
//# sourceMappingURL=chunk-7QBFOJ3E.js.map
|