Peter Steinberger
b080dd1e76
refactor: consolidate coercion contracts ( #122458 )
...
* refactor: consolidate coercion contracts
Centralize exact string, record, numeric, date, Boolean, argument, and structured-error coercions while preserving call-site semantics.
Migrate canonical-name collisions and deprecated internal SDK bypasses, deleting 55 net production/tooling lines. Expand declaration ownership enforcement to 101 allowed helpers and add a narrow export-completeness audit.
* fix: preserve standalone script coercions
Keep copied Control UI tooling self-contained and retain the trusted release harness module-relative source seam when the harness runs against an old target cwd.
2026-08-11 23:26:37 -07:00
Peter Steinberger
964c8c84c1
refactor: consolidate coercion ownership ( #122299 )
...
* refactor: consolidate coercion ownership
Centralize four canonical coercion helpers, migrate exact core and plugin duplicates through narrow Plugin SDK facades, and enforce declaration and plugin-normalization ownership boundaries.
The sweep adds eight focused SDK exports while deleting more production and tooling code than it adds. User-visible behavior is unchanged except for safer equivalent object and UI parsing at existing boundaries.
* fix: guard integer option ownership
Register resolveIntegerOption with the canonical function owner and extend the declaration-guard fixture so future local duplicates fail validation.
* fix: keep integer helpers on numeric facade
Remove the unshipped duplicate string-coerce exports and route every affected plugin consumer through the existing number-runtime contract.
* fix: point numeric coercion to number runtime
Make boundary and declaration diagnostics recommend the canonical numeric facade, with failing-before coverage for both guidance paths.
2026-08-11 17:14:53 -07:00
wangmiao0668000666 and Peter Steinberger
9dc5a9a152
fix(logging): publish diagnostics ZIP through staged atomic overwrite ( #122130 )
...
* fix(logging): publish diagnostics ZIP through staged atomic overwrite
A named support export wrote the in-memory ZIP buffer straight to the
final path, so a failed or interrupted overwrite truncated the previous
archive, and an existing file kept its pre-existing (potentially
permissive) mode since writeFile only applies mode on creation.
Route publication through writeExternalFileWithinRoot's sibling staging:
the new archive is written to a private sibling, fsynced, and atomically
renamed over the final path. A failed publication leaves the previous
ZIP untouched with no staging residue, and the rename always installs
the staged file's 0o600 mode. The command now returns the actual
published path.
Fixes #122064
* test(logging): prove failed zip replacement stays atomic
* test(sqlite): create private reliability fixture
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com >
2026-08-11 14:12:39 -07:00
Peter Steinberger
3d76246792
refactor: eliminate final export name collisions ( #122083 )
...
* refactor: resolve final export name collisions
* refactor: update remaining collision rename consumers
* style: format rebased auth helpers
* test: update remaining session entry mocks
* test: update remaining runtime mock exports
* test: update delivery info path mock
* refactor: reconcile combined collision sweeps
* chore: regenerate collision and sdk baselines
2026-08-11 11:18:24 -07:00
Peter Steinberger
db73b59c04
refactor: burn wrapper shadowing baseline entries ( #122040 )
...
* refactor: burn wrapper shadowing entries
* chore: refresh wrapper shadowing baselines
* test: update secrets runtime state mocks
* fix(ci): absorb Control UI build identity variance
2026-08-11 08:24:03 -07:00
Peter Steinberger
fa03d9b913
refactor: consolidate coercion helpers ( #121366 )
...
* refactor: consolidate coercion helpers
* fix: remove duplicate coercion imports
* fix: preserve serialized coercion guard
* chore: ratchet coercion helper carve-outs
* fix(test): keep gauntlet subprocess startup lean
* fix: preserve imported session timestamp semantics
* fix: preserve catalog timestamp string semantics
* chore: align plugin SDK surface ratchet
* fix: preserve trajectory and SDK string contracts
* fix(test): preserve QA record assertion semantics
* fix: complete standalone record guard rename
* refactor(cron): use canonical string coercion
* fix(acpx): preserve Pi timestamp parsing
* test(channels): adapt custody test harnesses
* test(telegram): classify media harness as test support
* test(acpx): split timestamp contract coverage
* test(channels): support generated custody contracts
* chore: ban the full coercion helper name set
Extends the declaration guard to all eleven consolidated helper names and
renames the cron schedule-identity readNumber wrapper to readScheduleInteger
so the banned generic name cannot regrow.
* fix(scripts): repair release-validation guard drift and lint cause
Restores the renamed isJsonRecord guard in assertTrustedWorkflowHarness after
main added isRecord call sites in parallel, and attaches the caught YAML error
as the thrown error cause (preserve-caught-error was red on main).
* fix: preserve Claude timestamp string semantics
* fix: preserve persisted timestamp string semantics
* fix: preserve date-first timestamp contracts
* fix(openai): harden delegation failure formatting
* chore: close coercion helper guard gaps
* test(openai): model non-error delegation rejection
* chore: refresh plugin SDK API contract
* fix(tasks): use canonical string field reader
* fix(ai): use canonical provider error field coercion
* fix(browser): migrate native bootstrap coercion
* docs(plugin-sdk): clarify text record export compatibility
* fix(gateway): normalize approval execution identity
* test(outbound): isolate message action poll harness
2026-08-11 00:02:18 -07:00
Peter Steinberger
3b828df2d9
test(logging): trim recovery duplicate coverage ( #121864 )
2026-08-10 22:10:26 -07:00
Peter Steinberger
11db07ac06
refactor(logging): remove dead console config fallback ( #121776 )
...
* refactor(logging): remove dead console config fallback
* test(logging): complete config module mock
2026-08-10 17:52:32 -07:00
Peter Steinberger and Amp
f09a33ce41
Optimize OpenAI turn latency and simplify reuse ( #121687 )
...
Amp-Thread-ID: https://ampcode.com/threads/T-019fe95b-d75c-70fc-82b6-4825ca874826
Co-authored-by: Amp <amp@ampcode.com >
2026-08-10 16:23:06 -07:00
Peter Steinberger
8616c0c374
refactor: finish shared test helper migrations ( #120996 )
...
* test: finish shared helper migrations
* test: fix helper migration CI
* style: fix test import ordering
* test(acpx): restore deferred void types
* test: fix helper migrations after rebase
2026-08-09 06:00:06 -07:00
Peter Steinberger
eecbfcc960
fix(infra): unify env-truthiness, missing-path, realpath, and abort-sleep semantics ( #120359 )
...
* fix(infra): unify environment truthiness
* fix(infra): unify missing path classification
* refactor(infra): unify realpath fallbacks
* fix(infra): unify abortable sleep errors
* docs(infra): clarify path fallback semantics
* fix(infra): route realpaths through policy wrapper
* fix(infra): ratchet plugin SDK wildcard budget
* fix(agents): preserve zero-delay abort precedence
* fix(infra): preserve fallback and media recovery contracts
* fix(plugins): share quarantine path resolution
2026-08-08 10:58:57 -07:00
joshavant
2253328618
fix(agents): centralize abort and progress authority
2026-08-07 18:42:57 -05:00
Josh Avant
8333892384
fix(agents): retain reply owners through cancellation
2026-08-07 18:42:57 -05:00
Josh Avant
8757119c77
fix(diagnostics): protect recovery authority
2026-08-07 18:42:57 -05:00
Josh Avant
90174086b3
fix(diagnostics): keep semantic provenance private
2026-08-07 18:42:57 -05:00
Josh Avant
32ad6834b1
fix(diagnostics): reserve semantic progress for core
2026-08-07 18:42:57 -05:00
Josh Avant
b731aea7e1
fix: trust semantic diagnostic progress
2026-08-07 18:42:57 -05:00
Josh Avant
4ea4596617
fix: bind semantic progress to run owner
2026-08-07 18:42:57 -05:00
Josh Avant
474be1700d
fix(diagnostics): preserve legacy progress liveness
2026-08-07 18:42:57 -05:00
Josh Avant
be8a954032
fix(diagnostics): classify semantic model progress
2026-08-07 18:42:57 -05:00
joshavant
7bcdb5823e
test: prove repeated request recovery through gateway
2026-08-07 18:42:57 -05:00
joshavant
517d0b1c2c
fix: recover repeated model requests without progress
2026-08-07 18:42:57 -05:00
Peter Steinberger
b4a26783f7
refactor(test): consolidate duplicated requireRecord and provider HTTP mock helpers ( #119982 )
...
* refactor(test): consolidate duplicated test helpers
* test: remove stale record guard import
* fix(test): remove orphaned record guards
* refactor(test): keep record requirement messages exhaustively typed
* fix(test): keep packages/ai record guard package-local
2026-08-06 14:48:01 -07:00
Vincent Koc
c4292bc8b2
fix(diagnostics): report exporter health in doctor and status ( #119816 )
...
* fix(diagnostics): report exporter health transitions
* fix(diagnostics): retire exporter health on shutdown
* test(diagnostics): enforce OTLP protobuf content type
* test(diagnostics): satisfy exporter test type contracts
* fix(diagnostics): redact endpoint-like exporter codes
* fix(diagnostics): coordinate exporter route health
* test(diagnostics): satisfy exporter health static gates
* fix(diagnostics): keep exporter health internal
2026-08-06 20:50:18 +08:00
Jason (Json)
40b0b3da39
fix(diagnostics): bound recent phase attribution ( #119625 )
2026-08-05 10:14:33 -06:00
Vincent Koc
554a6f3bbf
feat(sms): add Twilio MMS support ( #118664 )
...
* feat(sms): add Twilio MMS support
* fix(sms): harden hosted media bearer handling
* fix(sms): discard staged media before dispatch
* fix(sms): close staged media cleanup races
* fix(sms): finalize MMS metadata and race proof
* fix(media): bind local reads to authorized descriptors
* fix(sms): close MMS review gaps
* fix(media): make inbound root matching type-safe
* fix(media): route bounded reads through fs-safe facade
* test(media): satisfy async lint contracts
2026-08-04 05:46:37 +08:00
Peter Steinberger
d347cd1097
refactor: canonicalize cache mechanics ( #118262 )
...
* refactor: adopt shared map pruning
* refactor: share config-scoped ttl cache
* refactor: share backup link cache
* refactor: centralize native relay retention cap
* chore: remove obsolete bundled channel lint suppression
* chore: shrink max-lines baseline
* refactor: remove cache pruning wrappers
2026-08-02 19:33:13 -07:00
Peter Steinberger
3f3ceb2def
feat(gateway): track event-loop degradation persistence and add concurrency benchmark ( #118193 )
...
* feat(gateway): persist event loop degradation metrics
* fix(gateway): bound concurrency benchmark turn waits
2026-08-02 14:21:44 -07:00
Peter Steinberger and Peter Steinberger
e92a98c77d
fix(agents): stop repeated equivalent terminal exec failures ( #118071 )
...
Co-authored-by: Peter Steinberger <steipete@macos.shared >
2026-08-02 11:42:57 -07:00
Peter Steinberger
e46b4c34b0
fix(diagnostics): read active assistant context from canonical SQLite sessions ( #117945 )
...
* fix(diagnostics): read active assistant context from canonical SQLite sessions
* fix(logging): keep incognito transcript context out of diagnostics
2026-08-02 04:02:34 -07:00
Peter Steinberger
a5b8b7052b
fix(ui): preserve advanced cron delivery settings when cloning ( #117909 )
...
* refactor(ui): consolidate task and log contracts
* fix(cron): preserve advanced delivery routing
* refactor(ui): share relative-time bucketing
* fix(ui): retain narrow cron view types
* fix(ui): keep cron form field keys total
* style(ui): use narrowed task result boolean
2026-08-02 02:13:38 -07:00
Peter Steinberger
33ea3e16e9
refactor: consolidate core micro-helpers ( #117825 )
...
* refactor: centralize stable stringification
* refactor: reuse canonical record coercion
* refactor: reuse safe JSON parsing in cron storage
* refactor: centralize environment truthiness
* fix: enforce model scan and block reply timeouts
* refactor: consolidate signal-aware sleep helper
* fix: preserve plugin SDK sleep contract
* test: satisfy model scan timeout lint
2026-08-01 23:10:46 -07:00
Peter Steinberger
0ab2443692
fix(ui): eliminate core contract drift ( #117817 )
...
* fix(ui): eliminate core contract drift
* fix(ui): resolve cleanup contract checks
2026-08-01 22:10:22 -07:00
Paco Cartones and Vincent Koc
cb3cd94756
fix(net-policy): redact sig and x-* auth params in URLs and bodies ( #116957 )
...
* fix(redact): redact sig and x-* auth params (redact-sensitive-url.ts)
* test(redact): redact sig and x-* auth params (redact-sensitive-url.test.ts)
* fix(redact): redact sig and x-* auth params (redact.ts)
* test(redact): redact sig and x-* auth params (redact.test.ts)
* fix(logging): unify URL credential redaction
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org >
2026-08-01 10:04:13 +08:00
Vincent Koc
b732322540
fix(logging): avoid Vitest exit listener leaks ( #115929 )
2026-07-29 22:37:30 +08:00
Peter Steinberger
20eda756fa
fix(logging): scale heap pressure with V8 limit ( #115153 )
...
Fixes #104631 .
2026-07-28 07:20:13 -04:00
Ho Lim and Peter Steinberger
50f0e8d8ab
fix(diagnostics): exclude active steering from session backlog ( #114780 )
...
* fix(diagnostics): exclude active steering from session backlog
Signed-off-by: Ho Lim <subhoya@gmail.com >
* fix(diagnostics): cover reply-run steering backlog
Signed-off-by: Ho Lim <subhoya@gmail.com >
* test(qa): prove active steering drains diagnostics
Signed-off-by: Ho Lim <subhoya@gmail.com >
* test(diagnostics): format reply-run steering coverage
Signed-off-by: Ho Lim <subhoya@gmail.com >
* fix(diagnostics): keep backlog policy internal
Signed-off-by: Ho Lim <subhoya@gmail.com >
* test(qa): isolate Talk diagnostics client
Signed-off-by: Ho Lim <subhoya@gmail.com >
* test(qa): close Talk client before diagnostics
* test(qa): reuse Gateway diagnostic RPC client
* test(qa): retry Talk steering admission
---------
Signed-off-by: Ho Lim <subhoya@gmail.com >
Co-authored-by: Peter Steinberger <steipete@gmail.com >
2026-07-27 20:01:22 -04:00
Peter Steinberger
1cbbda18c3
perf(logging): flush file transport asynchronously off the request path ( #114769 )
...
* perf(logging): flush file transport asynchronously off the request path
* fix(ci): record flushLogger surface growth and drain before log reads
- +1 public export/callable budget with annotation: logger file-transport
flush for graceful shutdown drains; regenerate SDK API baseline
- three tests that read the log file right after logging now drain the
async file transport first (flushLogger) instead of racing the flusher
* test: drain async log transport before reading talk and request-trace logs
* test: drain async log transport in CLI logger file tests
* test: drop unused withTempDirSync import
2026-07-27 19:40:43 -04:00
Peter Steinberger
f0371e8d88
fix: stop blocked tool loops stalling until timeout ( #114673 )
...
* fix(agents): make global loop breaker reachable
Record loop-detector vetoes as typed no-progress outcomes so repeated blocked calls continue the existing streak without colliding with plugin or approval denials. Extract streak accounting into its own owner module and keep completed veto records out of argument reconciliation.\n\nFixes #109435 .
* test: harden isolated project routing
Route registry-sensitive UI tests through the isolated project for both focused and broad runs, centralize the isolated file list, and register the Codex prewarm test in the full extension shard.
* test(qa): prove global loop breaker runtime
Drive 31 identical read attempts through the real QA Gateway agent loop and verify the typed veto streak reaches the global circuit breaker before the turn returns a final marker.
* test: keep isolated UI files out of shared runs
Always exclude registry-sensitive files from the shared UI project and reject broad watch targets that would span shared and isolated projects.
2026-07-27 16:02:28 -04:00
79c517df89
fix(agents): stop stable tool argument churn ( #112620 )
...
* fix(agents): detect stable tool argument churn
* fix(agents): refine argument churn evidence
* fix(agents): route argument churn through recovery
* fix(agents): reconcile rewritten loop arguments
* fix(agents): defer churn recovery across policy waits
* fix(agents): preserve churn clocks across policy waits
* fix(agents): harden concurrent churn policy tracking
* fix(agents): avoid stale churn false positives
* fix(agents): satisfy loop diagnostic CI guards
* fix(agents): normalize write churn outcomes
* fix(logging): order churn activity events
* fix(agents): classify churn no-progress outcomes
---------
Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com >
Co-authored-by: Vincent Koc <vincentkoc@ieee.org >
2026-07-28 01:34:37 +08:00
Peter Steinberger and 1052326311
269bc5c89e
fix(cli): preserve machine-readable stdout ( #113654 )
...
Co-authored-by: 1052326311 <65798732+1052326311@users.noreply.github.com >
2026-07-27 05:44:16 -04:00
Peter Steinberger
0951d0dd30
fix(agents): keep queued replies alive across lane waits and make stuck recovery truthful ( #114058 )
...
* fix(agents): keep queued replies alive across lane waits and make stuck recovery truthful
* fix(auto-reply): guard optional reply operation in lane-wait progress
* fix(auto-reply): limit dropped-reply feedback to pre-run stale expiries
* test(auto-reply): add staleExpiryReason to memory runner stub
* refactor(auto-reply): make staleExpiryReason optional on reply operations
2026-07-26 03:07:26 -04:00
Peter Steinberger
977c8e9d37
refactor(policy): drop retired redactSensitive doctor remediation ( #113961 )
...
Sensitive log redaction became unconditional and `logging.redactSensitive`
was retired from the config schema, but the policy doctor still classified
`dataHandling.sensitiveLogging.requireRedaction` as an automatic repair that
would have written the retired key back into config.
Remove the automatic repair (check-id registration, patch branch, and the
`enableSensitiveLoggingRedaction` writer), drop the `logging.redactSensitive`
config target, and reclassify the check as `validateOnly`. The check keeps
evaluating the policy declaration against the redaction invariant; it just no
longer claims a fixable config target. Refresh the policy docs, the finding
fix hint, and a stale comment in `src/logging/redact.ts`.
2026-07-25 18:27:31 -07:00
Peter Steinberger
332006bc1f
test: consolidate OpenClaw test state fixtures ( #113576 )
...
* test: consolidate OpenClaw test state fixtures
* test(plugin-sdk): expose isolated test state
Promote the isolated OpenClaw test-state lifecycle through a narrow published Plugin SDK subpath so extension tests no longer import private core helpers. This intentional SDK surface addition is maintainer-approved.
* test: use SDK test-state seam in extensions
Route bundled extension suites through the focused repo-local Plugin SDK test-state entrypoint and remove the Codex projector harness exports made stale by fixture consolidation. Keep the seam out of production builds and published package artifacts while auditing its real consumers in the full-tree deadcode scan.
* test(plugins): map test-state in package boundaries
2026-07-25 05:30:52 -07:00
Peter Steinberger
3018e8b78a
refactor: deduplicate micro helpers onto canonical homes ( #113534 )
...
* refactor: deduplicate micro helpers
* fix(ai): keep hash prefix helper internal
2026-07-25 00:41:01 -07:00
Pavan Kumar Gondhi
91ea4e03fa
fix: redact additional GitLab token prefixes [AI] ( #112954 )
...
* fix: redact additional GitLab token prefixes
* fix: cover GitLab runner token variants
* test: construct GitLab redaction fixtures
* fix: consume full GitLab OAuth tokens
* fix: preserve long GitLab OAuth redaction
* fix: keep legacy OAuth token masking
2026-07-24 14:15:15 +05:30
Pavan Kumar Gondhi
c38ad6c76f
fix: redact unquoted config secret assignments [AI] ( #112952 )
...
* fix: redact config file secret assignments
* fix: cover prefixed config password keys
* test: assemble redaction fixture values
* fix: cover quoted config redaction gaps
* test: avoid raw quoted secret fixtures
* fix: cover config redaction edge cases
* fix: redact hyphenated token properties
* fix: cover spaced config equals values
* fix: cover quoted spaced config values
* fix: cover snake case config prefixes
2026-07-24 11:46:38 +05:30
Pavan Kumar Gondhi
dbb8bb4780
fix: redact AWS secret access keys [AI] ( #112947 )
...
* fix: redact AWS secret access keys
* fix logging redaction token ordering
* fix redaction token precedence
* fix AWS redaction base64 boundaries
* avoid redaction test literal payloads
* generate AWS redaction test fixtures
* move redaction fixture generation
* move AWS data URL regression test
* fix encoded AWS secret key aliases
* fix support redaction secret key guard order
* fix support redaction token ordering
* fix support redaction AWS secret args
* fix AWS secret CLI flag redaction
2026-07-24 11:41:12 +05:30
Peter Steinberger
3b7b2a2a1f
chore: update dependencies and migrate major contracts ( #112963 )
...
* build(deps): complete latest dependency migrations
* fix(deps): satisfy updated dependency types
* fix(deps): hold incompatible build tooling
* fix(deps): preserve portable tooling contracts
* build(deps): allow reviewed fresh transitive releases
* fix(deps): repair major upgrade validation
* build(deps): regenerate current dependency graph
* fix(logging): keep tslog adapter type private
* fix(agents): narrow grep subprocess handle
* fix(codex): prefer pinned managed binary
* fix(codex): fence managed native provenance
* build(deps): align codex ACP with managed harness
* fix(slack): use socket-mode Undici runtime
* fix(slack): detect cross-runtime responses
* fix(slack): bridge package-owned fetch types
* fix(deps): retain tslog v4 JSON contract
* build(plugin-sdk): refresh logging API manifest
2026-07-23 21:21:01 -07:00
Peter Steinberger
f5562748de
fix(logging): give non-default profiles their own gateway log file ( #112777 )
...
* fix(logging): give non-default profiles their own gateway log file
* chore: defer profile log release note
2026-07-22 19:08:41 -04:00