Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
495 commits
Select commit Hold shift + click to select a range
5e141f0
test: exercise closed Cloud external target handoff
danshapiro Oct 11, 2026
93fb507
fix: qualify replacement fixture inputs from the current retained owner
danshapiro Oct 11, 2026
17f78e2
fix: validate and forward paired synthetic Cloud browser targets
danshapiro Oct 11, 2026
24c8836
test: exercise managed fixture host PTY refusal through real endpoints
danshapiro Oct 11, 2026
d08faff
fix: refuse ordinary host terminals in managed acceptance fixtures
danshapiro Oct 11, 2026
6a14e38
test(runtime): exercise closed managed fixture input routing
danshapiro Oct 11, 2026
39f2029
fix(runtime): select only closed managed fixture inputs
danshapiro Oct 11, 2026
12b8564
test(browser): execute closed external project discovery
danshapiro Oct 11, 2026
6ad6f84
test: assemble isolated managed environment acceptance fixture
danshapiro Oct 11, 2026
67afe9a
fix: mount selected synthetic HOME for managed supervisor
danshapiro Oct 11, 2026
b2a7b69
test: bind managed acceptance to protocol and owned cleanup
danshapiro Oct 11, 2026
1d44ac1
fix(testing): negotiate managed fixture websocket protocol
danshapiro Oct 11, 2026
580549e
fix(testing): use typed managed create and reconnect helpers
danshapiro Oct 11, 2026
32b8add
test: exercise ordinary terminal refusal in managed fixture
danshapiro Oct 11, 2026
047cbbb
test: protect managed create failure evidence before cleanup
danshapiro Oct 11, 2026
97ae489
fix: retain safe managed create failure evidence
danshapiro Oct 11, 2026
b7a6662
test: cover actual managed failure diagnostic producers
danshapiro Oct 11, 2026
f07cd4f
fix: retain owned lifecycle and safe managed launch causes
danshapiro Oct 11, 2026
5a8dc4c
fix: close optional OneCLI inputs in managed fixture
danshapiro Oct 11, 2026
de3aae0
test(managed-runtime): cover driver daemon socket selection
danshapiro Oct 11, 2026
1210bc9
fix(managed-runtime): use fixture Docker socket for source identity
danshapiro Oct 11, 2026
d609e2c
test: preserve rejected managed preparation destinations in diagnostics
danshapiro Oct 11, 2026
e64a017
fix: retain rejected preparation path in safe broker diagnostics
danshapiro Oct 11, 2026
58becfc
fix: keep recovery observation in test builds
danshapiro Oct 11, 2026
67ee32a
test: exercise managed OpenCode fixture selection through native disc…
danshapiro Oct 11, 2026
794ad50
refactor: keep provider qualification assertions idiomatic
danshapiro Oct 11, 2026
0497ddd
fix: select each managed OpenCode fixture configuration
danshapiro Oct 11, 2026
acabcef
test: preserve managed grant delivery failure evidence
danshapiro Oct 11, 2026
5054745
test: prepare owned broker before grant diagnostics
danshapiro Oct 11, 2026
99c17a2
fix: retain managed grant delivery diagnostics
danshapiro Oct 11, 2026
4e4da56
test: reproduce native auth preparation under private provider identity
danshapiro Oct 11, 2026
bece73c
test(managed): run native auth cases under controller identity
danshapiro Oct 11, 2026
6902f8e
test(managed): bind native auth fixture to indexed generation
danshapiro Oct 11, 2026
cbdb5ea
fix(managed): read native auth as the provider identity
danshapiro Oct 11, 2026
4cfb1c8
test: cover managed preflight identity observation
danshapiro Oct 11, 2026
1a7241a
fix: observe managed preflight output before native identity
danshapiro Oct 11, 2026
26275dc
test: activate managed environment browser harness
danshapiro Oct 12, 2026
4bd81fb
test: protect managed preparation failures through pane reloads
danshapiro Oct 12, 2026
edd1ca5
fix: retain managed configuration failures on their create requests
danshapiro Oct 12, 2026
25dff05
fix: retry managed preparation failures without a resume identity
danshapiro Oct 12, 2026
459db7a
test: protect managed browser attempt completion and retries
danshapiro Oct 12, 2026
afd670e
fix: retain managed browser target through retry completion
danshapiro Oct 12, 2026
7e83008
test: retain managed browser attempt completion and failed requests
danshapiro Oct 12, 2026
1c26980
test: bind failed-pane browser checks to the real create request
danshapiro Oct 12, 2026
dbca947
test: protect concurrent managed browser scenario lifetimes
danshapiro Oct 12, 2026
5cfa3e4
fix: await concurrent managed browser scenarios before cleanup
danshapiro Oct 12, 2026
3d6f3ef
Normalize managed OpenCode failure origins
danshapiro Oct 12, 2026
c9ec095
Make managed OpenCode failure fixtures deterministic
danshapiro Oct 12, 2026
fb0cce0
test: build managed acceptance client from current commit
danshapiro Oct 12, 2026
86abbac
test: anchor managed browser acceptance at cloud dispatch
danshapiro Oct 12, 2026
5ea7a88
fix: validate Cloud task timeout before dispatch
danshapiro Oct 12, 2026
58fa752
fix: match gcloud duration normalization
danshapiro Oct 12, 2026
9a99372
fix: match gcloud binary rounding
danshapiro Oct 12, 2026
0d80d0e
test: record managed browser acceptance counts
danshapiro Oct 12, 2026
83f0bd8
fix: preserve checkpoint scope across resumed sessions
danshapiro Oct 12, 2026
ed626d3
fix: persist fresh-agent checkpoint availability
danshapiro Oct 12, 2026
0919de4
fix: reject incomplete checkpoint snapshots
danshapiro Oct 12, 2026
fc4afd0
feat: preserve checkpoint workspace and turn outcomes
danshapiro Oct 12, 2026
4f705c0
fix: stop checkpoint git on request cancellation
danshapiro Oct 12, 2026
db8edc5
Use server-owned fresh-agent checkpoint outcomes
danshapiro Oct 12, 2026
5f972fa
Add configured checkpoint browser target
danshapiro Oct 12, 2026
52e263d
Add provider-native checkpoint turn identities
danshapiro Oct 12, 2026
8d69dc1
Retry OpenCode checkpoint identity history reads
danshapiro Oct 12, 2026
a686953
feat: gate fresh-agent sends on checkpoint capture
danshapiro Oct 12, 2026
20977fc
Bind checkpoint outcomes to provider user rows
danshapiro Oct 12, 2026
838fa83
fix: persist checkpoint results across pane recovery
danshapiro Oct 12, 2026
4263d8a
Merge remote-tracking branch 'origin/main' into the-usual/managed-pro…
danshapiro Oct 12, 2026
eb8b6a2
fix: initialize hosted sends without checkpoint intent
danshapiro Oct 12, 2026
8a6cbfa
fix: retain managed preparation failures across reload
danshapiro Oct 12, 2026
2130141
fix: normalize Cloud Playwright summary logs
danshapiro Oct 12, 2026
88a28d0
fix: capture live provider resume evidence
danshapiro Oct 12, 2026
910c32b
test: tolerate loaded native auth callback
danshapiro Oct 12, 2026
3cc328a
Fix managed checkpoint identity and retry recovery
danshapiro Oct 12, 2026
3b45941
Fix restricted checkpoint fixture permissions
danshapiro Oct 12, 2026
8402cf3
Preserve checkpoint target failure evidence
danshapiro Oct 12, 2026
8943a0e
Keep checkpoint target isolated under rootless Docker
danshapiro Oct 12, 2026
4e7b8c4
Preflight checkpoint controls and settle owned cloud retries
danshapiro Oct 12, 2026
16bee1e
Run checkpoint controls with sandbox Node path
danshapiro Oct 12, 2026
a595b6b
Clear preflight requests before checkpoint browser run
danshapiro Oct 12, 2026
6efee33
Handle exited checkpoint process during join
danshapiro Oct 12, 2026
cdb4558
style(test): remove trailing blank line
danshapiro Oct 12, 2026
a77691c
fix(testing): respect target rate limits in checkpoint acceptance
danshapiro Oct 12, 2026
74d5375
fix(testing): expose Codex in checkpoint target
danshapiro Oct 12, 2026
a0c8f1d
test(managed-provider): fix source mode under restrictive umask
danshapiro Oct 12, 2026
f8e6976
test(checkpoint): align fixture and verify websocket barrier
danshapiro Oct 12, 2026
c15c74f
test(checkpoint): align cloud acceptance with turn labels
danshapiro Oct 12, 2026
4924390
docs(plan): correct managed checkpoint verification paths
danshapiro Oct 12, 2026
8dffca3
fix(testing): package Cloud Vitest dependencies
danshapiro Oct 12, 2026
ab43068
fix(checkpoints): satisfy workspace clippy
danshapiro Oct 12, 2026
ef67af0
fix(protocol): freeze checkpoint outcome schemas
danshapiro Oct 12, 2026
9dd1570
test(sandbox): use executable temp for process fixtures
danshapiro Oct 12, 2026
3335ed9
fix: include enabled OpenCode MCP command resources
danshapiro Oct 12, 2026
4811242
fix: preserve explicit checkpoint scope and log failures
danshapiro Oct 12, 2026
c919cac
test: correct runtime inventory and cli output capture
danshapiro Oct 12, 2026
9993da0
fix(checkpoints): preserve explicit account-home scope
danshapiro Oct 13, 2026
335f448
fix(opencode): stage actual MCP script operands
danshapiro Oct 13, 2026
88daa21
fix(testing): include broker path diagnostics
danshapiro Oct 13, 2026
c48feda
test(checkpoints): verify selected HOME rewind in browser
danshapiro Oct 13, 2026
72f4433
fix(opencode): accept Bun MCP package scripts
danshapiro Oct 13, 2026
17c03eb
fix(checkpoints): honor resolved session workspace scope
danshapiro Oct 13, 2026
87531f3
fix(managed): resolve checkpoint scope and Bun scripts
danshapiro Oct 13, 2026
721cc29
fix(managed): retain Bun ancestor dependencies
danshapiro Oct 13, 2026
ffd0bd3
test(checkpoints): cover linked-worktree session rewind
danshapiro Oct 13, 2026
37f63f8
fix: preserve checkpoint workspace across session history
danshapiro Oct 13, 2026
e209f7e
test: verify nested OpenCode MCP startup
danshapiro Oct 13, 2026
84749df
feat(runtime): include pinned Bun for MCP commands
danshapiro Oct 13, 2026
3ff81b0
test: assert nested Bun MCP launch cwd correctly
danshapiro Oct 13, 2026
c99dec0
test: prove managed MCP staging and checkpoint history
danshapiro Oct 13, 2026
d9f41bc
fix: stage indexed OpenCode files for managed launch
danshapiro Oct 13, 2026
c328185
fix: stream indexed provider files without persistent copies
danshapiro Oct 13, 2026
70e7022
test: authorize selected provider input roots
danshapiro Oct 13, 2026
1a1b90a
fix(checkpoints): keep account home out of snapshot scope
danshapiro Oct 13, 2026
fbe80e8
fix(checkpoints): reject owner account homes as scopes
danshapiro Oct 13, 2026
f31298a
test(checkpoints): close provider pane through its shell
danshapiro Oct 13, 2026
d068c74
fix(checkpoints): fail closed on unknown workspace owners
danshapiro Oct 13, 2026
41bba38
fix(checkpoints): allow group-owned workspace scopes
danshapiro Oct 13, 2026
c9c2569
fix(checkpoints): inspect profiles for well-known Windows SIDs
danshapiro Oct 13, 2026
69ec188
test(checkpoints): cover native Windows SYSTEM profile
danshapiro Oct 13, 2026
d317797
refactor(session-metadata): name validated update fields
danshapiro Oct 13, 2026
089a8d5
fix(checkpoints): preserve explicit workspace in history
danshapiro Oct 13, 2026
aa19e6f
fix(managed): settle terminal status from lifecycle
danshapiro Oct 13, 2026
ccfa16f
fix(managed): broadcast final lifecycle changes
danshapiro Oct 13, 2026
5034cbf
fix(managed): notify exits after lifecycle-only outcomes
danshapiro Oct 13, 2026
962c40a
fix(managed): observe lifecycle after output timeout
danshapiro Oct 13, 2026
27da078
Bound OpenCode MCP command resources
danshapiro Oct 13, 2026
6d391a9
Preserve blocked managed terminal status
danshapiro Oct 13, 2026
bea16e8
test: stabilize checkpoint browser readiness
danshapiro Oct 13, 2026
87ffb02
fix(managed): stage MCP script closure and refresh status
danshapiro Oct 13, 2026
3acbdf8
fix(managed): preserve direct MCP executables and modules
danshapiro Oct 13, 2026
179b803
fix(managed): stage direct MCP script siblings
danshapiro Oct 13, 2026
64890b1
fix(managed): stage direct MCP script dependencies
danshapiro Oct 13, 2026
06157af
chore: use default request id fallback
danshapiro Oct 13, 2026
d8c9d81
test: tolerate transient copied-script busy errors
danshapiro Oct 13, 2026
472f7e4
fix(managed): close direct MCP script dependencies
danshapiro Oct 13, 2026
d7dcbb9
fix(recovery): preserve managed error after retained exit
danshapiro Oct 13, 2026
fa4326b
fix(managed): resolve bounded local script imports
danshapiro Oct 13, 2026
54fd0ac
fix(managed): handle recursive local script imports
danshapiro Oct 13, 2026
f67fcae
fix(ui): clear stale managed launch failures
danshapiro Oct 13, 2026
ef10fcc
fix(managed): stage bounded script resources from home
danshapiro Oct 13, 2026
4120eca
fix(managed): preserve configured script resource closures
danshapiro Oct 13, 2026
d627b20
fix(recovery): retire stale provider config placeholders
danshapiro Oct 13, 2026
6e5e70e
fix(managed): identify missing provider secret references
danshapiro Oct 13, 2026
611e82a
chore: remove stale Freshell automation skill link
danshapiro Oct 13, 2026
fdc7059
fix(ui): persist final managed inventory status
danshapiro Oct 13, 2026
e7e2daa
fix(managed): retain Node directory resources
danshapiro Oct 13, 2026
1df5b52
fix(managed): reissue after discovered roots disappear
danshapiro Oct 13, 2026
34347cd
fix(managed): recognize env-launched Node resources
danshapiro Oct 13, 2026
7670ee8
fix(ui): summarize mixed managed pane status
danshapiro Oct 13, 2026
692455f
fix(managed): identify generated MCP by declaring project
danshapiro Oct 13, 2026
28679b6
fix(ui): preserve final managed inventory status
danshapiro Oct 13, 2026
185ddad
fix(managed): preserve OpenCode resource selection
danshapiro Oct 13, 2026
ac37024
fix(managed): retain Bun script resources
danshapiro Oct 13, 2026
63f5492
test(managed): retry transient executable busy fixture
danshapiro Oct 13, 2026
4cd119f
fix(managed): filter workspace from package resources
danshapiro Oct 13, 2026
11c995b
fix(managed): preserve nested resource dependencies
danshapiro Oct 13, 2026
b889a26
fix(managed): preserve file-alias sibling resources
danshapiro Oct 13, 2026
2c4ef94
fix(managed): reject unbounded workspace-root scripts
danshapiro Oct 13, 2026
444fb1e
fix(managed): preserve separately mounted workspace aliases
danshapiro Oct 13, 2026
0e8838b
fix(managed): stage direct OpenCode MCP command resources
danshapiro Oct 13, 2026
e759462
fix(managed): complete Node MCP script dependency staging
danshapiro Oct 13, 2026
11bbfc2
fix(managed): complete MCP dependency staging
danshapiro Oct 13, 2026
53c31c4
fix(managed): close recovery and resource staging races
danshapiro Oct 13, 2026
d8b3461
fix(managed): scan nested imports in staged scripts
danshapiro Oct 13, 2026
b3c2eb9
fix(managed): stage direct Node options and write resources
danshapiro Oct 13, 2026
2760487
fix(e2e): retry delayed Playwright summaries
danshapiro Oct 13, 2026
b4010c3
test(managed): cover direct HOME MCP append
danshapiro Oct 13, 2026
e951fe7
test(managed): place HOME MCP under XDG root
danshapiro Oct 14, 2026
fa66d42
test(managed): capture safe startup log events
danshapiro Oct 14, 2026
a42a32d
test(managed): summarize safe server log context
danshapiro Oct 14, 2026
05fa63a
test(managed): retain safe preparation failure cause
danshapiro Oct 14, 2026
379cd4f
test(managed): classify safe runtime launch errors
danshapiro Oct 14, 2026
46441db
test(managed): classify runtime client failures
danshapiro Oct 14, 2026
652b2ce
test(managed): seed append target beside HOME MCP
danshapiro Oct 14, 2026
9f56565
fix(managed): allow exact static MCP output writes
danshapiro Oct 14, 2026
d882a1a
fix(managed): preserve writable MCP output state
danshapiro Oct 14, 2026
810415b
fix(testing): retain complete managed run diagnostics
danshapiro Oct 14, 2026
50d12f0
fix(testing): authorize prepared writable resource files
danshapiro Oct 14, 2026
97b7d60
fix(managed): scope URL output bindings
danshapiro Oct 14, 2026
376ac5a
fix(testing): attribute cloud summaries by task
danshapiro Oct 14, 2026
24b8ac3
fix(managed): resolve nested URL output bindings
danshapiro Oct 14, 2026
726375b
fix(testing): require passing Cloud browser evidence
danshapiro Oct 14, 2026
2204ff4
fix(managed): detect conditional URL aliases
danshapiro Oct 14, 2026
bf60fcf
fix(testing): wait for passed cloud footer
danshapiro Oct 14, 2026
8f6325e
test(runtime): provide managed failure log directory
danshapiro Oct 14, 2026
4e49f25
fix(managed): preserve harmless conditional URL outputs
danshapiro Oct 14, 2026
4cea612
fix(managed): write through conditional URL aliases
danshapiro Oct 14, 2026
80a7d8c
fix(managed): preserve nested writable resources
danshapiro Oct 14, 2026
29fd605
Fix nested writable file mount staging
danshapiro Oct 14, 2026
b4ba967
fix(managed): recover aliased external writable mounts
danshapiro Oct 14, 2026
8cfc59d
fix(test): unblock managed runtime browser retries
danshapiro Oct 14, 2026
c273fb7
fix(managed): protect OpenCode MCP env files
danshapiro Oct 14, 2026
b193f42
fix(managed): protect shell MCP env references
danshapiro Oct 14, 2026
261e05a
fix(managed): stage OpenCode MCP environment references
danshapiro Oct 14, 2026
6bf5b18
fix(managed): preserve OpenCode MCP env-file references
danshapiro Oct 14, 2026
b264b9d
fix(managed): retire stale OpenCode env aliases
danshapiro Oct 14, 2026
e3cbc7e
fix(managed): keep recovery env aliases bounded
danshapiro Oct 14, 2026
e26cc0b
test(managed): select a valid OpenCode fixture model
danshapiro Oct 14, 2026
d506804
test(managed): diagnose HOME MCP sibling mounts
danshapiro Oct 14, 2026
c089a43
test(managed): trace HOME MCP startup and mounts
danshapiro Oct 14, 2026
2b84451
test(managed): validate generated HOME MCP script
danshapiro Oct 14, 2026
60a1fc3
test(managed): diagnose workspace MCP startup
danshapiro Oct 14, 2026
43e7bd2
test(managed): include MCP startup failure receipt
danshapiro Oct 14, 2026
a0e8aa6
test(managed): report OpenCode MCP preflight status
danshapiro Oct 14, 2026
1ad2610
test(managed): capture MCP command mount diagnostics
danshapiro Oct 14, 2026
6b46139
test(managed): report workspace MCP path permissions
danshapiro Oct 14, 2026
cf7cda7
test(managed): make MCP fixture wrapper searchable
danshapiro Oct 14, 2026
6940c48
test(managed): assert private env mount target
danshapiro Oct 14, 2026
e41edb1
test(managed): assert direct MCP wrapper cwd
danshapiro Oct 14, 2026
c7a0ae2
test(managed): tolerate retry terminals in reconnect check
danshapiro Oct 14, 2026
d9bc4d7
fix: scope OpenCode resources to selected worktree
danshapiro Oct 14, 2026
fd68d14
test: cover checkpoint timeout and cooldown policy
danshapiro Oct 14, 2026
1ed7d8f
fix: give strict sandbox installs a writable pnpm store
danshapiro Oct 14, 2026
da3ef36
docs: document managed references and copy limits
danshapiro Oct 14, 2026
b83c308
test: wait for retained pane state after reconnect
danshapiro Oct 15, 2026
8ecd4bf
test: stabilize checkpoint cooldown log test
danshapiro Oct 15, 2026
1a65237
test: delay checkpoint fixture turn completion
danshapiro Oct 15, 2026
2ac3055
Index retained output spool replay
danshapiro Oct 15, 2026
e887f71
Harden retained output index recovery
danshapiro Oct 15, 2026
634ca38
Restore durable checkpoint rewind availability
danshapiro Oct 15, 2026
5d76df4
Publish provider reference aliases transactionally
danshapiro Oct 15, 2026
0e36e87
fix: retain older replayed checkpoint outcomes
danshapiro Oct 15, 2026
41adfc5
fix: paginate checkpoint recovery and isolate index rebuilds
danshapiro Oct 15, 2026
128ec67
fix: preserve checkpoint recovery and provider exit
danshapiro Oct 15, 2026
6c67ed7
fix: preserve rewind outcomes and completion writes
danshapiro Oct 15, 2026
841eece
test: assert selected checkpoint rewind target
danshapiro Oct 15, 2026
a5c6f51
test: classify managed runtime launch operation
danshapiro Oct 15, 2026
99d5136
test: classify managed host failure operation
danshapiro Oct 15, 2026
7875ec3
fix: follow managed provider reference links
danshapiro Oct 15, 2026
95bb1ad
test: capture managed recovery failure diagnostics
danshapiro Oct 15, 2026
5d18279
test: capture managed recovery failure details
danshapiro Oct 15, 2026
434632d
fix: trust durable checkpoint history on reload
danshapiro Oct 15, 2026
98de862
fix: preserve configured aliases during recovery
danshapiro Oct 15, 2026
5bc5f20
test: stabilize checkpoint lock timeout
danshapiro Oct 16, 2026
f490d89
test: verify provider aliases after recovery
danshapiro Oct 16, 2026
39acdcd
test: bind recovery MCP receipt to replacement process
danshapiro Oct 16, 2026
736de26
fix managed pane reconcile before identity
danshapiro Oct 16, 2026
729ec91
tighten managed browser reconnect checks
danshapiro Oct 16, 2026
e400e3e
preserve complete cloud retry evidence
danshapiro Oct 16, 2026
92c45cd
fix managed provider recovery and checkpoints
danshapiro Oct 16, 2026
917570a
test: tolerate loaded Claude candidate fixtures
danshapiro Oct 16, 2026
2f1aa8b
test: assert checkpoint cooldown outcome code
danshapiro Oct 16, 2026
c0ac484
test: diagnose managed replacement MCP liveness
danshapiro Oct 16, 2026
e72e02e
test: inspect managed MCP as provider user
danshapiro Oct 16, 2026
15598fb
fix managed recovery and checkpoint ownership races
danshapiro Oct 16, 2026
8ab2802
fix checkpoint acceptance cleanup race
danshapiro Oct 16, 2026
fa44c43
fix checkpoint target auto-removal races
danshapiro Oct 16, 2026
0bfcc0b
stabilize checkpoint timeout tests
danshapiro Oct 16, 2026
a3b9360
add headroom to checkpoint timeout test
danshapiro Oct 16, 2026
3d2a366
Merge remote-tracking branch 'origin/main' into the-usual/managed-pro…
danshapiro Oct 16, 2026
d1b64e1
test: report managed fresh-agent create failures
danshapiro Oct 17, 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
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .codex/skills/freshell-automation-tmux-style

This file was deleted.

6 changes: 6 additions & 0 deletions .github/workflows/electron-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ jobs:
if: matrix.os == 'windows-2022'
run: cargo test --locked -p freshell-platform --lib cli_launch::cli_argv_goldens_file::native_windows_generated_claude_hooks_work_in_shells

# Exercise the real Windows owner-SID and ProfileList APIs for SYSTEM's
# profile. The Linux Rust/browser jobs cannot cover this Windows branch.
- name: Test Windows SYSTEM checkpoint-home rejection
if: matrix.os == 'windows-2022'
run: cargo test --locked -p freshell-server --bin freshell-server checkpoints::tests::windows_system_profile_is_rejected_as_checkpoint_scope

- name: Run Electron unit tests
run: pnpm run test:electron

Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,6 @@ All components **must** be accessible for browser-use automation and WCAG compli

## Subagent polling policy

Managed provider environment and recovery repair: [implementation plan](docs/plans/2026-10-05-managed-provider-environment.md).

When idle-waiting on subagents, always call `wait_agent` with `timeout_ms=3600000` (the 1-hour maximum). `wait_agent` wakes immediately on any subagent message or completion, so long timeouts add no latency — but every wait return (including a no-op timeout) costs a full model turn that re-sends the entire context. Never poll on shorter timeouts. Have workers `send_message` to `/root` at milestones so the parent wakes exactly when there is news.
42 changes: 42 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

132 changes: 108 additions & 24 deletions crates/freshell-agent-runtime/src/host_actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl FreshAgentProfile {
if self
.provider_launch_context
.as_ref()
.is_some_and(|context| context.validate(self.provider.as_str()).is_err())
.is_some_and(|context| context.validate(self.provider.native_provider()).is_err())
{
return Err(ActorError::InvalidProfile);
}
Expand Down Expand Up @@ -201,6 +201,18 @@ pub trait FreshAgentTransport: Send + Sync {
text: &str,
profile: &FreshAgentProfile,
) -> Result<DispatchAck, DispatchFailure>;
/// Dispatches a send whose checkpoint attempt identity must reach the
/// provider-native turn receipt. Legacy transports remain compatible and
/// ignore the optional metadata by delegating to `dispatch`.
async fn dispatch_with_checkpoint_identity(
&self,
request_id: &RequestId,
text: &str,
profile: &FreshAgentProfile,
_logical_attempt_id: Option<&str>,
) -> Result<DispatchAck, DispatchFailure> {
self.dispatch(request_id, text, profile).await
}
async fn resolve_permission(
&self,
decision_id: &str,
Expand Down Expand Up @@ -312,6 +324,8 @@ struct PersistedDecision {
struct PersistedActorState {
schema_version: u32,
profile: FreshAgentProfile,
#[serde(default)]
initialization_state: Option<CommandState>,
commands: BTreeMap<String, PersistedCommand>,
#[serde(default)]
completed_forks: BTreeMap<String, ForkTransition>,
Expand All @@ -327,6 +341,7 @@ impl PersistedActorState {
Self {
schema_version: 1,
profile,
initialization_state: None,
commands: BTreeMap::new(),
completed_forks: BTreeMap::new(),
decisions: BTreeMap::new(),
Expand Down Expand Up @@ -414,32 +429,74 @@ impl FreshAgentHostActor {
fs::create_dir_all(&state_dir).map_err(persist)?;
let writer_lock = WriterLock::acquire(&state_dir.join("fresh-agent-writer.lock"))?;
let state_path = state_dir.join("fresh-agent-state.json");
let mut state = if state_path.exists() {
let bytes = fs::read(&state_path).map_err(persist)?;
let mut loaded: PersistedActorState =
serde_json::from_slice(&bytes).map_err(persist)?;
let mut expected_profile = profile.clone();
if expected_profile.native_session_id.is_none() {
expected_profile.native_session_id = loaded.profile.native_session_id.clone();
}
if loaded.profile != expected_profile {
return Err(ActorError::NativeIdentityMismatch);
}
for command in loaded.commands.values_mut() {
if matches!(command.state, CommandState::Dispatching) {
command.state = CommandState::Ambiguous;
let (mut state, newly_initialized) = match fs::read(&state_path) {
Ok(bytes) => {
let mut loaded: PersistedActorState =
serde_json::from_slice(&bytes).map_err(persist)?;
// A successful transport start may still have returned no
// identity. Reopening that durable actor must not create a
// second conversation from missing metadata alone.
if loaded.profile.native_session_id.is_none() {
return Err(ActorError::AmbiguousDispatch);
}
}
for decision in loaded.decisions.values_mut() {
if matches!(decision.state, DecisionState::Dispatching) {
decision.state = DecisionState::Ambiguous;
let mut expected_profile = profile.clone();
if expected_profile.native_session_id.is_none() {
expected_profile.native_session_id = loaded.profile.native_session_id.clone();
}
// The host validates a fresh preparation for each incarnation.
// Its grant and resource generation may change while the durable
// conversation and every other launch setting remain the same.
let current_preparation = expected_profile.provider_launch_context.take();
let current_references = expected_profile.provider_secret_references.clone();
if current_preparation.is_some() {
// Configuration-file references belong to the host-validated
// preparation. Legacy OneCLI grants remain durable settings.
if !current_references
.iter()
.filter(|reference| !reference.profile.is_configuration_file())
.eq(loaded
.profile
.provider_secret_references
.iter()
.filter(|reference| !reference.profile.is_configuration_file()))
{
return Err(ActorError::NativeIdentityMismatch);
}
expected_profile.provider_secret_references =
loaded.profile.provider_secret_references.clone();
expected_profile.provider_launch_context =
loaded.profile.provider_launch_context.clone();
}
if loaded.profile != expected_profile {
return Err(ActorError::NativeIdentityMismatch);
}
loaded.profile.provider_launch_context = current_preparation;
loaded.profile.provider_secret_references = current_references;
for command in loaded.commands.values_mut() {
if matches!(command.state, CommandState::Dispatching) {
command.state = CommandState::Ambiguous;
}
}
for decision in loaded.decisions.values_mut() {
if matches!(decision.state, DecisionState::Dispatching) {
decision.state = DecisionState::Ambiguous;
}
}
(loaded, false)
}
loaded
} else {
PersistedActorState::new(profile)
Err(error) if error.kind() == std::io::ErrorKind::NotFound => {
(PersistedActorState::new(profile), true)
}
Err(error) => return Err(persist(error)),
};

if newly_initialized {
// Publish intent before the first provider creation. A resumed
// actor keeps its accepted preparation until exact identity is
// verified below.
state.initialization_state = Some(CommandState::Dispatching);
write_state(&state_dir, &state)?;
}
let started = transport
.start(&state.profile)
.await
Expand All @@ -457,6 +514,7 @@ impl FreshAgentHostActor {
event_count_cap,
)?;
}
state.initialization_state = Some(CommandState::Completed);
write_state(&state_dir, &state)?;
let actor = Arc::new(Self {
state_dir,
Expand Down Expand Up @@ -525,12 +583,33 @@ impl FreshAgentHostActor {
request_id: RequestId,
text: String,
settings: Option<FreshAgentTurnSettings>,
) -> Result<CommandState, ActorError> {
self.dispatch_with_checkpoint_identity(request_id, text, settings, None)
.await
}

pub async fn dispatch_with_checkpoint_identity(
&self,
request_id: RequestId,
text: String,
settings: Option<FreshAgentTurnSettings>,
logical_attempt_id: Option<String>,
) -> Result<CommandState, ActorError> {
// One provider conversation has one ordered input lane. Keep the
// durability transition and provider acceptance boundary within the
// same fence so concurrent gateways cannot become double writers.
let _dispatch_guard = self.dispatch_lock.lock().await;
let command_material = serde_json::to_vec(&(text.as_str(), &settings)).map_err(persist)?;
// Preserve the exact historical digest for legacy sends so a command
// journal created before this field existed remains idempotent after
// upgrade. A modern checkpointed send additionally fences the logical
// attempt identity into durable request-ID conflict detection.
let command_material = match logical_attempt_id.as_deref() {
Some(logical_attempt_id) => {
serde_json::to_vec(&(text.as_str(), &settings, logical_attempt_id))
}
None => serde_json::to_vec(&(text.as_str(), &settings)),
}
.map_err(persist)?;
let digest = digest(&command_material);
let dispatch_profile;
{
Expand Down Expand Up @@ -572,7 +651,12 @@ impl FreshAgentHostActor {

let result = self
.transport
.dispatch(&request_id, &text, &dispatch_profile)
.dispatch_with_checkpoint_identity(
&request_id,
&text,
&dispatch_profile,
logical_attempt_id.as_deref(),
)
.await;
let mut state = self.state.lock().await;
let command = state
Expand Down
Loading
Loading