Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
347 commits
Select commit Hold shift + click to select a range
97453c6
feat: measure exact winning initial debounce interval
zzet Oct 28, 2026
c864513
feat: record exact accepted physical attempt completion
zzet Oct 28, 2026
c24269d
Merge updated daemon teardown base into compaction
zzet Oct 28, 2026
5ff092b
test: retain retry recorder through late attempt completion
zzet Oct 28, 2026
f6087b3
feat: observe canonical cohort and batch admission intervals
zzet Oct 28, 2026
16da9c6
feat: measure exclusive edit control and caller result intervals
zzet Oct 28, 2026
85d35b5
feat: measure actual physical attempt control boundaries
zzet Oct 28, 2026
f6e377e
feat: publish immutable accepted attempt accounting
zzet Oct 28, 2026
eaba230
test: separate caller result from dispatcher preamble accounting
zzet Oct 28, 2026
05880c2
fix: retain attempt identity in physical accounting snapshots
zzet Oct 28, 2026
9810cd5
fix: satisfy pinned timing instrumentation checks
zzet Oct 28, 2026
cf34d7c
fix: log the frozen physical attempt identity
zzet Oct 28, 2026
12b8b9d
test(indexer): cover native successor timing ownership
zzet Oct 28, 2026
fa1fcb3
feat(indexer): expose independent coalesced publication timing
zzet Oct 28, 2026
e32ee26
feat(indexer): measure requested background timer coalescing
zzet Oct 28, 2026
e3ca2ee
fix(indexer): snapshot related background and serving timing together
zzet Oct 28, 2026
475f3da
test(indexer): retain superseding background attempt fixture
zzet Oct 28, 2026
90c3ed5
merge: integrate load harness measurement dependency
zzet Oct 28, 2026
2170656
feat(bench): define finite Poisson edit probe arrivals
zzet Oct 28, 2026
15287fc
feat(bench): retain exact identities for concurrent edit calls
zzet Oct 28, 2026
55c78bc
feat(bench): scope typed retry handling to edit probes
zzet Oct 28, 2026
dd41ef3
fix(bench): classify retries from actual refusal data
zzet Oct 28, 2026
13a5aec
test(mcp): classify physical WAL observation capability
zzet Oct 28, 2026
e4f1d5b
feat(bench): verify edit facts and independent accounting windows
zzet Oct 28, 2026
85423fc
test(load): bind edit probes to producer facts and attempt identity
zzet Oct 28, 2026
06e3481
fix(load): read freshness claims only from response riders
zzet Oct 28, 2026
97e9c8f
test(load): require measured physical accounting states
zzet Oct 28, 2026
3620354
feat(load): run finite edit-and-probe accounting scenario
zzet Oct 28, 2026
c46fdf9
docs(load): clarify edit probe CLI and diagnostics
zzet Oct 28, 2026
27d2d2d
test(load): update schemas for optional edit probe evidence
zzet Oct 28, 2026
079c97b
fix(load): satisfy static checks in edit probe controls
zzet Oct 28, 2026
78d3228
fix(load): stop polling immutable partial physical coverage
zzet Oct 28, 2026
fb7c30a
feat(daemon): retain admitted MCP wire identity in its lease
zzet Oct 28, 2026
e1313be
test: wait for measured clock separation in held lifecycle controls
zzet Oct 28, 2026
a4161dc
feat(indexer): retain bounded read-repair admission observations
zzet Oct 28, 2026
526dee4
feat(indexer): bind repair observations to accepted source bytes
zzet Oct 28, 2026
ab48928
test(indexer): guard repair evidence at authority refusal
zzet Oct 28, 2026
1158fb5
fix(indexer): witness repair execution owner without retention
zzet Oct 28, 2026
e14c3bc
feat(indexer): expose incarnation-fenced repair observation
zzet Oct 28, 2026
cdf26ee
feat(mcp): link read repair to retained committed-byte witnesses
zzet Oct 28, 2026
6326156
fix(indexer): exclude inert receipts from repair publisher proof
zzet Oct 28, 2026
c35e1bd
test(indexer): exercise repair proof through real batch receipts
zzet Oct 28, 2026
1bb1550
fix(indexer): match repair scope to canonical receipt keys
zzet Oct 28, 2026
41e0cab
test(indexer): observe clock separation at held phase boundaries
zzet Oct 28, 2026
05ab6f4
test(indexer): make repair lock-boundary assertions explicit
zzet Oct 28, 2026
7b0131c
fix(mcp): observe repair against the pre-ack admitted ticket
zzet Oct 28, 2026
472137a
fix(mcp): retain accepted repair identity beyond receipt expiry
zzet Oct 28, 2026
30a97b2
Merge main mutation fallback and fixture fixes into edit measurements
zzet Oct 28, 2026
aac0e13
feat: distinguish observed native duplicate attempt accounting
zzet Oct 29, 2026
7a93521
test: close direct watcher fixture without an unstarted loop
zzet Oct 29, 2026
8855181
fix: stop diagnostic collection on proven terminal duplicate coverage
zzet Oct 29, 2026
d0da6ea
feat: measure read-assisted publisher phases within its own window
zzet Oct 29, 2026
391f5d1
feat: validate actual read-assisted publisher accounting independently
zzet Oct 29, 2026
c7348ed
fix: await late publisher and background evidence after duplicate com…
zzet Oct 29, 2026
6160433
test: describe optional read-assisted accounting window in report schema
zzet Oct 29, 2026
a7b529e
Merge shutdown recovery and current main before publisher validation
zzet Oct 29, 2026
f6150b7
test: include optional publisher accounting in paired report schema
zzet Oct 29, 2026
1642d61
fix: lowercase read-repair accounting error text
zzet Oct 29, 2026
9dfd49b
fix: bind publisher evidence to the original publication identity
zzet Oct 29, 2026
9281d09
docs: describe independent publisher phases and late evidence
zzet Oct 29, 2026
1281be4
fix(load): bound raw evidence spool by accepted bytes
zzet Oct 29, 2026
1436c93
test(load): join held evidence writers during cleanup
zzet Oct 29, 2026
ce63460
fix(indexer): measure ordered native timer handoffs
zzet Oct 29, 2026
10f33ce
test(indexer): cover handoff overflow and refusal wire identity
zzet Oct 29, 2026
3b0fe3d
fix(load): retain nil sink on evidence setup failure
zzet Oct 29, 2026
87ac736
fix(indexer): retain observed callback refusal reasons
zzet Oct 29, 2026
cfdc610
refactor(load): share edit reply and probe observations
zzet Oct 29, 2026
df99b8a
fix: retain read-repair witness before watcher admission
zzet Oct 29, 2026
1e76164
test: await bound ticket in admitted read-repair fixture
zzet Oct 29, 2026
23553dd
fix: bind in-flight read-repair candidates after actual commit
zzet Oct 29, 2026
69fb542
test: isolate read-repair ownership refusal from readiness
zzet Oct 29, 2026
d0d29a0
feat: pair initial edit-and-probe accounting requests
zzet Oct 29, 2026
3dc190c
docs: specify zero linked worktrees for paired accounting cell
zzet Oct 29, 2026
bbf29b8
test: use resource envelope for paired stats fixture
zzet Oct 29, 2026
169582d
Merge main into edit-loop measurements
zzet Oct 29, 2026
9847518
fix: make paired probe cancellation ownership explicit
zzet Oct 29, 2026
c41147f
test(mcp): reproduce read repair straddling commit bookkeeping
zzet Oct 29, 2026
6b4a837
test(mcp): hold straddling repair before its source read
zzet Oct 29, 2026
f42ea2d
fix(mcp): bind read repair to its actual applied acceptance
zzet Oct 29, 2026
9a56f62
feat(bench): add explicit TypeScript intrafile probe cell
zzet Oct 30, 2026
e4ed101
feat(bench): add explicit Python intrafile probe cell
zzet Oct 30, 2026
541dd2a
style(bench): satisfy language fixture lint checks
zzet Oct 30, 2026
6fef7b8
feat(bench): add explicit whole-file intrafile write cell
zzet Oct 30, 2026
d888e4d
test(bench): refresh optional write intent schemas
zzet Oct 30, 2026
25f90fa
feat(load): model distinct one-file batch receipt identities
zzet Oct 30, 2026
04df200
feat(load): bind batch acknowledgements to offered whole-file bytes
zzet Oct 30, 2026
0dfc5ce
feat(mcp): isolate batch file publication observation ownership
zzet Oct 30, 2026
1a6ab98
feat(mcp): retain observed batch writer returns behind final verdict
zzet Oct 30, 2026
f45b329
feat: bind measured batch file to its original publication ticket
zzet Oct 30, 2026
e6c12aa
feat: expose separate bounded batch file timing references
zzet Oct 30, 2026
6e7828b
test: cover real batch writer and durable observation boundaries
zzet Oct 30, 2026
5184e48
perf: avoid batch timing lookup without an observed request
zzet Oct 30, 2026
58a3c12
test: refuse batch publication timing after real directory rollback
zzet Oct 30, 2026
d2da547
test: retain original batch file ticket after actual receipt loss
zzet Oct 30, 2026
8a8982a
test: bind batch file accounting to public transaction and original p…
zzet Oct 30, 2026
b70d0d8
feat: account shared batch ACK independently from per-file publisher …
zzet Oct 30, 2026
eac39e0
feat: collect one-file batch evidence through distinct public timing …
zzet Oct 30, 2026
498621c
test: pin optional batch timing identity schema
zzet Oct 30, 2026
6b1d4ad
fix: honor explicit parser inapplicability for owned batch ACK windows
zzet Oct 30, 2026
e7da37a
test: reproduce batch reader capture before durable verdict and ticke…
zzet Oct 30, 2026
6255f24
test: propagate held batch fixture failure through the real handler
zzet Oct 30, 2026
0c42edd
fix: retain exact batch writer candidate across publication admission
zzet Oct 30, 2026
6782dce
test: preserve batch completion and ownership fences across early rea…
zzet Oct 30, 2026
24dbec5
test: require explicit null parser evidence and propagate fixture tim…
zzet Oct 30, 2026
babec98
test: specify direct requested background ownership and real failed S…
zzet Oct 30, 2026
eca6bac
test: inspect arm bounds only after direct background publication
zzet Oct 30, 2026
14061e3
feat: measure direct requested background with exact pre-callback adm…
zzet Oct 30, 2026
dc57a7e
test: reject borrowed native intervals from direct requested backgrou…
zzet Oct 30, 2026
8ae64ae
test: bind direct background predecessor proof before testing contrad…
zzet Oct 30, 2026
c75e3d2
fix: size the direct background projection with integer lap counts
zzet Oct 30, 2026
44ddea9
test: retain coalesced arithmetic while separating requested quiet ow…
zzet Oct 30, 2026
438cb82
test: retain native handoff totals with an unexecuted requested quiet…
zzet Oct 30, 2026
40d9be0
feat: bind explicit symbol-splice fixtures to actual Go TypeScript an…
zzet Oct 30, 2026
57b0ed9
feat: bind symbol-splice parser applicability to the offered and prod…
zzet Oct 30, 2026
0c47440
feat(load): distinguish declared symbol absence from probe errors
zzet Oct 30, 2026
3f980ba
test(load): require owned declaration proof before absence probes
zzet Oct 30, 2026
4eb302e
fix(load): retain absence identity only for uncensored complete evidence
zzet Oct 30, 2026
6c53aee
fix(load): publish actual edit send time before acknowledgement
zzet Oct 30, 2026
8bc6e7a
test(load): send a complete edit request in held acknowledgement control
zzet Oct 30, 2026
8567e11
feat(load): add exact rename fixtures with positive and absence oracles
zzet Oct 30, 2026
fc6776e
feat(load): verify symbol deletion with explicit complete absence evi…
zzet Oct 30, 2026
72797b5
feat(load): add explicit numeric leaf fixtures and relation oracles
zzet Oct 30, 2026
18be869
test(mcp): exercise valid body and signature measurement splices
zzet Oct 30, 2026
8e5cab2
feat(load): route rename and delete through supported edit adapters
zzet Oct 30, 2026
74174b3
docs(load): distinguish operation fixtures and explicit absence evidence
zzet Oct 30, 2026
f2d7a57
feat(load): retain matched expected-refusal pairs as a separate category
zzet Oct 30, 2026
03cf2ac
fix(load): honor explicit empty producer collections and stale rename…
zzet Oct 30, 2026
4aed632
feat(load): witness body changes with stable following declarations
zzet Oct 30, 2026
989a3c4
feat(load): add compatible signature-change fixtures and specific ora…
zzet Oct 30, 2026
37d1f05
fix(load): request exact source ranges for mutation witnesses
zzet Oct 30, 2026
846b45b
fix(load): respect search fallback and language signature representat…
zzet Oct 30, 2026
148146f
test(load): bound complete search evidence for hundred-symbol fixtures
zzet Oct 30, 2026
5d64fed
feat(load): add explicit crossfile call fixtures and callee admission
zzet Oct 30, 2026
e138e01
test(load): distinguish Go relocation from unsupported move measurements
zzet Oct 30, 2026
c286bfa
Merge remote-tracking branch 'origin/main' into feat/edit-loop-measur…
zzet Oct 30, 2026
6849709
fix(indexer): bind refusal snapshots to the retained final publicatio…
zzet Oct 30, 2026
eab3ee4
fix(load): fence crossfile admission to real root-level source results
zzet Oct 30, 2026
a597c15
test(load): construct the parseable error-envelope refusal fixture
zzet Oct 30, 2026
4b0fd43
test(mcp): reproduce relocation caller reconciliation on real indexer…
zzet Oct 30, 2026
f3dbc2c
fix(mcp): preserve token separation when moving adjacent Go declarations
zzet Oct 30, 2026
315bf81
feat(mcp): observe real move writes and direct reconcile owners
zzet Oct 30, 2026
8760886
test(mcp): require actual per-file move executor and shared acknowled…
zzet Oct 30, 2026
6826667
fix(mcp): fence move publication by actual competing write order
zzet Oct 30, 2026
c437627
fix(mcp): project move acknowledgement without legacy physical timing…
zzet Oct 30, 2026
2729303
feat(mcp): expose direct move scheduling applicability without synthe…
zzet Oct 30, 2026
92731f6
feat(load): validate standalone move acknowledgements and independent…
zzet Oct 30, 2026
a3bc1c3
fix(load): keep unavailable move clocks null and owner-bound
zzet Oct 30, 2026
e082546
feat(load): plan explicit Go relocations with owned destination oracles
zzet Oct 30, 2026
ab4ac21
fix(mcp): keep each move direct admission and refusal immutable
zzet Oct 30, 2026
a56659b
test(load): fence the full offered Go relocation fixture
zzet Oct 30, 2026
116cd88
fix(mcp): preserve the first final move refusal on repeated callbacks
zzet Oct 30, 2026
4733741
feat(load): collect original Go move owners after immediate dual-file…
zzet Oct 30, 2026
51fad39
test(load): require both owned files in the public move restore batch
zzet Oct 30, 2026
7d7f260
style(load): format explicit move runtime controls
zzet Oct 30, 2026
284bf5a
test(load): preserve immediate own-ACK move readbacks before timing q…
zzet Oct 30, 2026
ecc3006
docs(load): describe explicit changed-fact and Go relocation cells
zzet Oct 30, 2026
a32e1c3
fix(load): retain bad move readbacks without polling immutable failur…
zzet Oct 30, 2026
4dde001
test(load): stop move collection while preserving a failed immediate …
zzet Oct 30, 2026
4b3f5b3
test(load): regenerate optional relocation report schemas
zzet Oct 30, 2026
89c511e
fix(load): match exact old-symbol absence with real inline suggestions
zzet Oct 30, 2026
8a92808
test(mcp): cover a real public target publication before move direct …
zzet Oct 30, 2026
4bf869c
test(mcp): distinguish read-assisted publication from the later direc…
zzet Oct 30, 2026
9270656
test(mcp): fence independent move read publication by original file o…
zzet Oct 30, 2026
aecddf0
feat(mcp): retain the actual read-assisted publisher of an observed m…
zzet Oct 30, 2026
8d2f363
feat(mcp): expose immutable actual move publication causes and monoto…
zzet Oct 30, 2026
74ad0ac
test(load): bind actual move reader causes and full independent windows
zzet Oct 30, 2026
a8ee7c9
feat(load): validate and name actual move publication routes without …
zzet Oct 30, 2026
5b8706f
test(mcp): prove actual public and direct move callers coalesce into …
zzet Oct 30, 2026
fc7c03f
docs(load): distinguish real move publication routes and shared windows
zzet Oct 30, 2026
4b5f492
style: format the move read-assisted observation controls
zzet Oct 30, 2026
8932891
test(load): expose optional named move publication routes in schemas
zzet Oct 30, 2026
8d8b0c4
style: apply pinned lint fixes to operation measurement controls
zzet Oct 30, 2026
0b0b0f5
style: format the operation checkpoint lint corrections
zzet Oct 30, 2026
b67c714
style: simplify the remaining move ownership and restore conditions
zzet Oct 30, 2026
41d8257
style(mcp): format the retained batch acknowledgement and phase guards
zzet Oct 30, 2026
e28247e
test(mcp): pin actual JSON and TOON edit probe wire contracts
zzet Oct 30, 2026
8a7cb0c
feat(load): decode requested TOON text without borrowing JSON evidence
zzet Oct 30, 2026
836ed7c
feat(load): select explicit JSON or TOON edit and probe output indepe…
zzet Oct 30, 2026
4dfc3dc
test(load): preserve JSON identity and bind TOON intent without chang…
zzet Oct 30, 2026
f32f8ac
feat(load): prove complete TOON emitted rows without synthesizing omi…
zzet Oct 30, 2026
ab3cf71
feat(load): retain requested wire modes and refuse unsupported TOON s…
zzet Oct 30, 2026
1f19d8e
docs(load): qualify TOON wire evidence and unsupported signature meta…
zzet Oct 30, 2026
a5128fe
test(mcp): prove a TOON signature graph witness without missing metadata
zzet Oct 30, 2026
a322f37
fix(load): distinguish full TOON summaries from compact traversals an…
zzet Oct 30, 2026
b06abc7
test(load): refuse traversal census proof on a full summary producer
zzet Oct 30, 2026
9406267
test(mcp): capture both public handler panic boundaries
zzet Oct 30, 2026
cab178b
test(mcp): use base-corpus routing for in-memory output fixtures
zzet Oct 30, 2026
0f91d44
fix(load): separate exact auxiliary session notes from measured wire …
zzet Oct 30, 2026
c81297a
fix(load): preserve producer order for auxiliary notes
zzet Oct 30, 2026
885099c
feat(load): prove TOON signature edits through actual relative traver…
zzet Oct 30, 2026
8947f9f
test(load): compare normalized traversal depth as an exact integer
zzet Oct 30, 2026
8c9d8ee
test(load): honor request-copy float representation for small depth
zzet Oct 30, 2026
404dba6
chore(load): publish optional edit output selection in report schemas
zzet Oct 30, 2026
fd1e1c3
Merge remote-tracking branch 'origin/main' into feat/edit-loop-measur…
zzet Oct 31, 2026
a6223e2
Merge main into shared dispatch lanes
zzet Oct 31, 2026
5270ba0
fix(mcp): bind dead_code's fallback process admission to the request
zzet Oct 31, 2026
0e95006
docs(mcp): scope the shared dispatch lanes to MCP transports
zzet Oct 31, 2026
dc222e2
test(load): pin the default edit-and-probe plan identity
zzet Oct 31, 2026
fb6a4c9
feat(load): plan fixed-editor arrivals for several editors on one rep…
zzet Oct 31, 2026
d4d6311
feat(load): route each edit and its own readbacks through its fixed e…
zzet Oct 31, 2026
ff99943
docs(load): describe several fixed editors on one repository
zzet Oct 31, 2026
f25ffe5
feat(load): add an explicit baseline role that reports absent phase t…
zzet Oct 31, 2026
d175ff1
feat(load): report readback, file-graph, relations, search and derive…
zzet Oct 31, 2026
6a183b2
feat(load): summarize edit-probe distributions with seeded bootstrap …
zzet Oct 31, 2026
c7f4562
fix(daemon): let HTTP cancellation bypass dispatch admission
zzet Oct 31, 2026
354f0f0
fix(mcp): stop queueing an edit's wait once its publication lands
zzet Oct 31, 2026
a0401f9
fix(daemon): route HTTP tool calls on the transport's inputs after ad…
zzet Oct 31, 2026
ec6ce01
test(mcp): pin dead_code's fallback admission failing on a lookup error
zzet Oct 31, 2026
0e96ae9
feat(load): measure pure reads under edit beside a same-run no-edit w…
zzet Oct 31, 2026
8dc6d01
docs(load): document roles, per-edit times, intervals and reads under…
zzet Oct 31, 2026
9a89044
refactor(load): isolate the strict edit output decoder
zzet Oct 31, 2026
18a0ad7
Merge remote-tracking branch 'origin/main' into fix/post-warmup-store…
zzet Oct 31, 2026
58d12b0
feat(load): account GCX as an explicitly unavailable output mode
zzet Oct 31, 2026
9176f33
test(mcp): pin the actual compact text producers used by edit probes
zzet Oct 31, 2026
1151c2a
feat(load): decode compact text answers for presence-proved call addi…
zzet Oct 31, 2026
2741338
feat(load): probe through the CLI call verb as its own transport
zzet Oct 31, 2026
2cc5922
docs(load): describe compact, CLI and unavailable GCX accounting
zzet Oct 31, 2026
677277a
feat(load): measure explicit TypeScript and Python relocation refusal…
zzet Oct 31, 2026
da10f2c
Merge remote-tracking branch 'origin/main' into fix/startup-repo-load…
zzet Oct 31, 2026
252b9d2
test(startup): register the janitor ownership fixture through tracking
zzet Oct 31, 2026
0222fae
feat(load): add native shell-write and editor-save senders with their…
zzet Oct 31, 2026
5cfe671
feat(load): add native create/delete pairs and a two-editor hot-file …
zzet Oct 31, 2026
bd21d76
feat(load): measure a daemon kill and restart with an acknowledged re…
zzet Oct 31, 2026
414a05e
docs(load): document live refusals, native writes and lifecycle cells
zzet Oct 31, 2026
46631a4
fix(load): take the closing receipt on the restart cell's reopened ed…
zzet Oct 31, 2026
ac0447a
feat(bench): probe startup admission from before the socket exists
zzet Oct 31, 2026
4bbcc6d
fix(load): kill the restart cell's daemon while its edit ACK is outst…
zzet Oct 31, 2026
b273e36
fix(load): ignore a native delete's absence answers before its create…
zzet Oct 31, 2026
f22f617
fix(load): refuse whole-file edit.write with several editors
zzet Oct 31, 2026
e41a893
fix(load): rank censored edit records above observed values in quantiles
zzet Oct 31, 2026
6ecd05b
fix(load): count reads under edit only while a sent edit's receipt is…
zzet Oct 31, 2026
e6bfd88
test(load): decode restart receipt status before checking its fields
zzet Nov 1, 2026
c0b83b6
fix(load): accept native write evidence in edit-probe phase validation
zzet Nov 1, 2026
495284f
Merge main performance budgets into edit-loop measurements
zzet Nov 1, 2026
de2e831
Merge scoped read parent into edit-loop measurements
zzet Nov 1, 2026
48ed957
Merge artifact workflow parent into edit-loop measurements
zzet Nov 1, 2026
e10f0f7
test(mcp): request full output for deletion measurement evidence
zzet Nov 1, 2026
a493395
test(mcp): count whole-edge reads in scoped file search
zzet Nov 1, 2026
7e3d1c6
test(mcp): compare scoped unwrapped handler payloads to Go oracle
zzet Nov 1, 2026
82f1a5b
Merge main into dispatch lanes
zzet Nov 1, 2026
16ec2e6
Integrate edit-loop timing with dispatch lanes
zzet Nov 1, 2026
1e58d0b
fix(load): snapshot native file identity before replacement
zzet Nov 1, 2026
553ed19
Integrate portable native edit observations
zzet Nov 1, 2026
463bb75
Merge validated edit-path changes before scoped oracle checks
zzet Nov 1, 2026
386b2e8
Merge validated dispatch and edit stack before compaction checks
zzet Nov 1, 2026
0202d75
Merge validated dispatch, edit and compaction stack into startup reco…
zzet Nov 1, 2026
12f9202
test(startup): register incoming MCP fixtures through the shared boun…
zzet Nov 1, 2026
df40f36
Merge validated compaction stack before final scoped oracle checks
zzet Nov 1, 2026
a2b90cc
Merge scoped oracle coverage after the validated compaction stack
zzet Nov 1, 2026
0a4bdfe
test(indexer): canonicalize registration identity fixture root
zzet Nov 1, 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
  •  
  •  
  •  
412 changes: 412 additions & 0 deletions bench/load/README.md

Large diffs are not rendered by default.

41 changes: 35 additions & 6 deletions bench/load/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ func checkToolResult(data json.RawMessage) error {
return errors.New("tool returned isError without error content")
}
var body struct {
Code string `json:"error_code"`
Message string `json:"message"`
Code string `json:"error_code"`
Message string `json:"message"`
Retriable bool `json:"retriable"`
Data map[string]any `json:"data"`
}
if err := json.Unmarshal(payload, &body); err != nil {
return err
Expand All @@ -64,7 +66,7 @@ func checkToolResult(data json.RawMessage) error {
if body.Code == "invalid_argument" {
code = -32602
}
return &rpcError{Code: code, Message: body.Code + ": " + body.Message}
return &rpcError{Code: code, Message: body.Code + ": " + body.Message, Data: body.Data, Retriable: body.Code == "repo_loading" && body.Retriable}
}

type toolCaller interface {
Expand All @@ -74,6 +76,14 @@ type toolCaller interface {
// Each logical call has its own product budget. The phase context may end
// sooner; that observation is right-censored, never a product deadline.
func callTool(ctx context.Context, client toolCaller, r request, args map[string]any, role string, agent, step, slot int, timeout time.Duration, sleep func(context.Context, time.Duration) error) (json.RawMessage, []Attempt, error) {
return callToolPolicy(ctx, client, r, args, role, agent, step, slot, timeout, sleep, false)
}

func callEditProbeTool(ctx context.Context, client toolCaller, r request, args map[string]any, role string, agent, step, slot int, timeout time.Duration, sleep func(context.Context, time.Duration) error) (json.RawMessage, []Attempt, error) {
return callToolPolicy(ctx, client, r, args, role, agent, step, slot, timeout, sleep, true)
}

func callToolPolicy(ctx context.Context, client toolCaller, r request, args map[string]any, role string, agent, step, slot int, timeout time.Duration, sleep func(context.Context, time.Duration) error, retryTyped bool) (json.RawMessage, []Attempt, error) {
logicalStart := time.Now()
productEnd := logicalStart.Add(timeout)
phaseEnd, phaseBounded := ctx.Deadline()
Expand All @@ -94,28 +104,47 @@ func callTool(ctx context.Context, client toolCaller, r request, args map[string
for retry := 0; ; retry++ {
start := time.Now()
data, err := client.call(callCtx, "tools/call", map[string]any{"name": r.Tool, "arguments": args})
returned := time.Now()
if retryTyped {
if clock, ok := client.(interface{ responseReturnedAt() time.Time }); ok {
if observed := clock.responseReturnedAt(); !observed.IsZero() && !observed.Before(start) {
returned = observed
}
}
}
if err == nil && callCtx.Err() != nil {
err = callCtx.Err()
}
if err == nil {
err = checkToolResult(data)
}
a := Attempt{Tool: r.name(), Role: role, Request: hash, Agent: agent, Step: step, Slot: slot, Retry: retry, Started: start, DurationMS: float64(time.Since(start)) / float64(time.Millisecond), LogicalMS: float64(time.Since(logicalStart)) / float64(time.Millisecond), Outcome: "success"}
a := Attempt{Tool: r.name(), Role: role, Request: hash, Agent: agent, Step: step, Slot: slot, Retry: retry, Started: start, DurationMS: float64(returned.Sub(start)) / float64(time.Millisecond), LogicalMS: float64(returned.Sub(logicalStart)) / float64(time.Millisecond), Outcome: "success"}
var remote *rpcError
if err != nil {
a.Outcome, a.Error = "error", err.Error()
if errors.As(err, &remote) {
a.Code = remote.Code
}
if remote != nil && remote.Code == -32002 {
if remote != nil && remote.Code == -32002 && (!retryTyped || remote.retryEditProbe()) {
a.Outcome = "busy"
} else if retryTyped && remote != nil && remote.retryEditProbe() {
a.Outcome = "retryable"
}
if _, expected := err.(*editProbeExpectedAbsence); expected {
a.Outcome = "expected_refusal"
a.Code = -32000
a.ExpectedOutcome = "symbol_absent"
}
if callCtx.Err() != nil {
a.Outcome = terminalOutcome()
err = errors.Join(err, callCtx.Err())
}
if retryTyped && errors.Is(err, errEditProbeEvidenceIncomplete) {
a.Outcome = "harness_incomplete"
}
}
attempts = append(attempts, a)
if a.Outcome != "busy" {
if a.Outcome != "busy" && a.Outcome != "retryable" {
return data, attempts, err
}
if err := sleep(callCtx, busyBackoff(retry)); err != nil {
Expand Down
76 changes: 72 additions & 4 deletions bench/load/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,27 @@ import (
const maxWireBytes = 64 << 20

type rpcError struct {
Code int `json:"code"`
Message string `json:"message"`
Code int `json:"code"`
Message string `json:"message"`
Data map[string]any `json:"data,omitempty"`
Retriable bool `json:"-"` // typed tool-result refusal, not a JSON-RPC top-level field
}

func (e *rpcError) Error() string { return fmt.Sprintf("RPC %d: %s", e.Code, e.Message) }

func (e *rpcError) retryEditProbe() bool {
if unknown, _ := e.Data["delivery_unknown"].(bool); unknown {
return false
}
// These are actual front-door shapes: dispatcher -32002 in
// mcp_request_lifetime.go, and repo_loading data in
// cmd/gortex/daemon_mcp_repo_loading.go. Unknowns stay terminal.
if e.Code == -32002 {
return true
}
return e.Retriable || e.Code == -32000 && e.Data["error_code"] == "repo_loading" && e.Data["retryable"] == true
}

type wireReply struct {
ID json.Number `json:"id"`
Result json.RawMessage `json:"result"`
Expand Down Expand Up @@ -51,6 +66,14 @@ type socketClient struct {
version string
}

// Per-call values returned to its caller, never a shared last-ID cache. Times
// retain monotonic readings until the scenario renders relative nanoseconds.
type wireCallIdentity struct {
ID int64
onWriteStart func(time.Time)
Started, WriteStarted, WriteFinished, ReplyDelivered, Finished time.Time
}

func readWireLine(reader *bufio.Reader) ([]byte, error) {
var data []byte
for {
Expand All @@ -66,6 +89,12 @@ func readWireLine(reader *bufio.Reader) ([]byte, error) {
}

func dialSocket(ctx context.Context, socket, cwd, mode string) (net.Conn, *bufio.Reader, string, error) {
return dialSocketSurface(ctx, socket, cwd, mode, "facade-v1", "hide")
}

// dialSocketSurface negotiates the session's tool surface in the handshake,
// as the CLI does per connection; the load workload always uses the facade.
func dialSocketSurface(ctx context.Context, socket, cwd, mode, tools, toolsMode string) (net.Conn, *bufio.Reader, string, error) {
conn, err := (&net.Dialer{}).DialContext(ctx, "unix", socket)
if err != nil {
return nil, nil, "", err
Expand All @@ -80,7 +109,7 @@ func dialSocket(ctx context.Context, socket, cwd, mode string) (net.Conn, *bufio
}
stop := context.AfterFunc(ctx, func() { _ = conn.Close() })
defer stop()
handshake := map[string]any{"version": 1, "mode": mode, "cwd": cwd, "client": "gortex-load", "tools": "facade-v1", "tools_mode": "hide"}
handshake := map[string]any{"version": 1, "mode": mode, "cwd": cwd, "client": "gortex-load", "tools": tools, "tools_mode": toolsMode}
if err := json.NewEncoder(conn).Encode(handshake); err != nil {
_ = conn.Close()
return nil, nil, "", err
Expand Down Expand Up @@ -190,6 +219,10 @@ func (c *socketClient) Close() error {
}

func (c *socketClient) send(ctx context.Context, value any, advisory bool) error {
return c.sendObserved(ctx, value, advisory, nil)
}

func (c *socketClient) sendObserved(ctx context.Context, value any, advisory bool, observation *wireCallIdentity) error {
data, err := json.Marshal(value)
if err != nil {
return err
Expand Down Expand Up @@ -227,7 +260,16 @@ func (c *socketClient) send(ctx context.Context, value any, advisory bool) error
_ = c.conn.Close()
close(interrupted)
})
if observation != nil {
observation.WriteStarted = time.Now()
if observation.onWriteStart != nil {
observation.onWriteStart(observation.WriteStarted)
}
}
_, err = io.Copy(c.conn, bytes.NewReader(append(data, '\n')))
if observation != nil {
observation.WriteFinished = time.Now()
}
if !stop() {
<-interrupted
}
Expand All @@ -242,6 +284,26 @@ func (c *socketClient) send(ctx context.Context, value any, advisory bool) error
}

func (c *socketClient) call(ctx context.Context, method string, params any) (json.RawMessage, error) {
return c.callObserved(ctx, method, params, nil)
}

func (c *socketClient) callWithIdentity(ctx context.Context, method string, params any) (json.RawMessage, wireCallIdentity, error) {
return c.callWithWriteObserver(ctx, method, params, nil)
}

func (c *socketClient) callWithWriteObserver(ctx context.Context, method string, params any, onWriteStart func(time.Time)) (json.RawMessage, wireCallIdentity, error) {
var observation wireCallIdentity
observation.onWriteStart = onWriteStart
data, err := c.callObserved(ctx, method, params, &observation)
observation.onWriteStart = nil
return data, observation, err
}

func (c *socketClient) callObserved(ctx context.Context, method string, params any, observation *wireCallIdentity) (json.RawMessage, error) {
if observation != nil {
observation.Started = time.Now()
defer func() { observation.Finished = time.Now() }()
}
if err := ctx.Err(); err != nil {
return nil, err
}
Expand All @@ -253,6 +315,9 @@ func (c *socketClient) call(ctx context.Context, method string, params any) (jso
}
c.next++
id := c.next
if observation != nil {
observation.ID = id
}
ch := make(chan wireReply, 1)
c.pending[id] = ch
c.mu.Unlock()
Expand All @@ -261,7 +326,7 @@ func (c *socketClient) call(ctx context.Context, method string, params any) (jso
delete(c.pending, id)
c.mu.Unlock()
}()
if err := c.send(ctx, map[string]any{"jsonrpc": "2.0", "id": id, "method": method, "params": params}, false); err != nil {
if err := c.sendObserved(ctx, map[string]any{"jsonrpc": "2.0", "id": id, "method": method, "params": params}, false, observation); err != nil {
return nil, err
}
select {
Expand All @@ -273,6 +338,9 @@ func (c *socketClient) call(ctx context.Context, method string, params any) (jso
cancel()
return nil, ctx.Err()
case reply := <-ch:
if observation != nil {
observation.ReplyDelivered = time.Now()
}
if ctx.Err() != nil {
return reply.Result, ctx.Err()
}
Expand Down
60 changes: 60 additions & 0 deletions bench/load/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,3 +427,63 @@ func TestInvalidationSubscriptionRecordsAvailabilityAndActualArguments(t *testin
})
}
}

func TestRecordedCallsKeepExactIdentityAcrossMultiplexedReplies(t *testing.T) {
ctx, cancel := context.WithTimeout(t.Context(), 5*time.Second)
defer cancel()
socket := startStub(t, func(frame stubFrame) (any, *rpcError) {
return map[string]any{"wire_id": frame.ID, "ordinal": frame.Params["ordinal"]}, nil
})
client, err := openMCP(ctx, socket, "")
if err != nil {
t.Fatal(err)
}
defer client.Close()
type result struct {
ordinal int
data json.RawMessage
identity wireCallIdentity
err error
}
results := make(chan result, 32)
var calls sync.WaitGroup
for ordinal := range 32 {
calls.Go(func() {
data, id, err := client.callWithIdentity(ctx, "identity", map[string]any{"ordinal": ordinal})
results <- result{ordinal, data, id, err}
})
}
calls.Wait()
close(results)
seen := make(map[int64]bool)
for result := range results {
if result.err != nil {
t.Fatal(result.err)
}
var decoded struct {
WireID int64 `json:"wire_id"`
Ordinal int `json:"ordinal"`
}
if err := json.Unmarshal(result.data, &decoded); err != nil {
t.Fatal(err)
}
id := result.identity
if id.ID != decoded.WireID || decoded.Ordinal != result.ordinal || seen[id.ID] {
t.Fatalf("misattributed multiplexed reply%+v %+v", result, decoded)
}
seen[id.ID] = true
if id.Started.IsZero() || id.WriteStarted.Before(id.Started) || id.WriteFinished.Before(id.WriteStarted) || id.ReplyDelivered.Before(id.WriteFinished) || id.Finished.Before(id.ReplyDelivered) {
t.Fatalf("incomplete/reversed call readings%+v", id)
}
}
}

func TestRecordedCanceledCallDoesNotFabricateWireOrReply(t *testing.T) {
ctx, cancel := context.WithCancel(t.Context())
cancel()
client := &socketClient{}
data, id, err := client.callWithIdentity(ctx, "not-sent", nil)
if !errors.Is(err, context.Canceled) || data != nil || id.ID != 0 || !id.WriteStarted.IsZero() || !id.ReplyDelivered.IsZero() || id.Started.IsZero() || id.Finished.Before(id.Started) {
t.Fatalf("fabricated canceled call data=%s identity=%+v err=%v", data, id, err)
}
}
Loading
Loading