Skip to content

Commit 2bf5660

Browse files
committed
docs(plan): seal auth foundation through Task 3
1 parent 55da217 commit 2bf5660

3 files changed

Lines changed: 21 additions & 16 deletions

File tree

plans/2026-09-03_production-agent-auth-and-usability.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ The RSS-tool migration is the first implementation phase. Tasks 1–13 remain bl
847847

848848
### Task 1: Address the integrated config/auth boundary
849849

850-
**Status:** acceptance reopened for the boundary address. Existing integration `1c0b8dfd8aaac82552adf66cf0dee114f0af4e8f` remains in history and is not reverted. This task must pass Stage A before Task 2 continuation.
850+
**Status:** accepted in the current integration line. Stage A passed independent spec and quality review after opaque identity, fixture isolation, bounded lifetime and CI-test race corrections. The accepted integration history is retained; no earlier integration commit is reverted.
851851

852852
**Objective:** add bounded structural config/auth schemas and path resolution while proving that provider selection/default/business interpretation is RSS-owned and that the foundation can be exercised through a minimal RSS entry.
853853

@@ -879,7 +879,7 @@ tests/config_rss_entry_tests.rs
879879

880880
### Task 2: Snapshot-review and build the secure auth store
881881

882-
**Status:** unaccepted. The interrupted Task 2 snapshot must be reviewed before continuation; no acceptance may be inferred from the existing integration commit.
882+
**Status:** accepted in the current integration line. The interrupted snapshot was frozen and reviewed before recovery; the completed store then passed independent spec and quality review, including canonical envelopes, generation-aware revocation, per-credential refresh single-flight and bounded secret-slot lifetime.
883883

884884
**Objective:** provide host-side credential persistence and concurrency primitives while keeping token lifecycle meaning and refresh/reauth policy in RSS.
885885

@@ -922,6 +922,8 @@ tests/auth_store_rss_tests.rs
922922

923923
### Task 3: Implement generic OAuth/PKCE primitives for RSS orchestration
924924

925+
**Status:** accepted in the current integration line. Generic PKCE, callback, bounded transport, authorization-code/device primitives and the real RSS flow entry passed independent spec and quality review. OAuth host entries remain fixture-only; Task 4 still owns production catalog exposure.
926+
925927
**Objective:** provide reusable crypto, callback, bounded transport and secret-persistence primitives without implementing a Rust OAuth workflow engine.
926928

927929
**RSS owner:** create `rss/auth/oauth_flow.rss` for generic authorization-code/device flow sequencing, refresh timing, retry/backoff and status/error policy. Provider adapters select scopes, public parameters and payload interpretation.
@@ -948,6 +950,8 @@ tests/oauth_rss_entry_tests.rs
948950

949951
**Commit:** `feat(auth): add generic oauth flows and refresh`
950952

953+
**Batch seal record (2026-09-07):** work through Task 3 is sealed at integration code commit `31f2df8` (Task 2 integration base `543543f`; Task 3 commits `a8ed9e9`, `318b025`, `31f2df8`). Final focused verification covered Task 1 config/auth, Task 2 store/RSS and Task 3 OAuth/RSS suites, plus format, workspace all-feature check and strict Clippy. Tasks 4 and later remain pending for a future batch; no production OAuth catalog is exposed by this seal.
954+
951955
### Task 4: Expose the confined OAuth host bridge
952956

953957
**Objective:** register generic host primitives for RSS without encoding Codex or any provider workflow in Rust.

tests/gateway_tests.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2351,9 +2351,7 @@ async fn stop_waits_on_a_blocking_thread_during_a_storage_stall() {
23512351
}
23522352
let slow_persistence = persistence.clone();
23532353
let slow_load = tokio::task::spawn_blocking(move || {
2354-
let started = std::time::Instant::now();
23552354
slow_persistence.load().expect("reload should succeed");
2356-
started.elapsed()
23572355
});
23582356
tokio::time::sleep(std::time::Duration::from_millis(150)).await;
23592357

@@ -2370,6 +2368,10 @@ async fn stop_waits_on_a_blocking_thread_during_a_storage_stall() {
23702368
.await
23712369
});
23722370
tokio::time::sleep(std::time::Duration::from_millis(150)).await;
2371+
assert!(
2372+
!slow_load.is_finished(),
2373+
"the seeded reload must still occupy the worker before stop"
2374+
);
23732375

23742376
// The stop request: while it is pending, an unrelated request spawned
23752377
// alongside it must still complete within a strict budget. On a
@@ -2411,17 +2413,16 @@ async fn stop_waits_on_a_blocking_thread_during_a_storage_stall() {
24112413
.0,
24122414
StatusCode::OK
24132415
);
2414-
2415-
let slow: std::time::Duration =
2416-
tokio::time::timeout(std::time::Duration::from_secs(120), slow_load)
2417-
.await
2418-
.expect("the reload must finish")
2419-
.expect("reload task must not panic");
24202416
assert!(
2421-
slow >= std::time::Duration::from_millis(1200),
2422-
"the seeded reload must actually occupy the worker for a while (took {slow:?})"
2417+
!slow_load.is_finished(),
2418+
"the unrelated request must complete while storage remains stalled"
24232419
);
24242420

2421+
tokio::time::timeout(std::time::Duration::from_secs(120), slow_load)
2422+
.await
2423+
.expect("the reload must finish")
2424+
.expect("reload task must not panic");
2425+
24252426
let (stop_status, stop_body) = tokio::time::timeout(std::time::Duration::from_secs(60), stop)
24262427
.await
24272428
.expect("the stop must finish once the stall drains")

tests/oauth_flow_tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use std::time::{Duration, Instant};
99

1010
use rustscript_agent::auth::oauth::{
1111
BoundedPublicOAuthIntent, BrowserOpener, CallbackMode, CallbackWaiter, CredentialUse,
12-
MAX_LIVE_OAUTH_FLOWS, OAuthClock, OAuthError, OAuthFlowKind, OAuthHost,
13-
OpaqueAuthorizationCodeHandle, OpaqueVerifierHandle, PreparedHttpsRequest, ProviderRequest,
14-
RawCallbackInput, RawHttpsResponse, ScriptedBrowser, ScriptedCallback, ScriptedCancel,
15-
ScriptedClock, ScriptedHttpsTransport, TrustedEndpoint, TrustedTransportPolicy,
12+
MAX_LIVE_OAUTH_FLOWS, OAuthError, OAuthFlowKind, OAuthHost, OpaqueAuthorizationCodeHandle,
13+
OpaqueVerifierHandle, PreparedHttpsRequest, ProviderRequest, RawCallbackInput, ScriptedBrowser,
14+
ScriptedCallback, ScriptedCancel, ScriptedClock, ScriptedHttpsTransport, TrustedEndpoint,
15+
TrustedTransportPolicy,
1616
};
1717
use rustscript_agent::auth::pkce::{self, PKCE_CHALLENGE_METHOD};
1818
use rustscript_agent::auth::store::AuthStore;

0 commit comments

Comments
 (0)