已开启
[MVP-10] Prove and implement the Codex subscription-backed worker adapter #13
urandon创建于  7月28日
urandon
urandon成员
7月28日 创建

Parent and architecture

  • Implementation epic: #6
  • Architecture: #1
  • Related vertical slice: #2
  • Depends on: #4, #9, #11, #12

Outcome

Demonstrate that a tenant-owned ChatGPT/Codex subscription can be connected, observed and used by an isolated scale-to-zero cloud worker, then implement it behind the harness/entitlement contracts.

Estimate

  • 13 SP / 7 engineering days
  • Risk: very high; time-boxed feasibility gate

Phase A: feasibility spike

  • Verify the supported device-code/login flow and credential persistence contract for the selected Codex/App Server version.
  • Verify App Server machine protocol and bounded one-run lifecycle inside the worker image.
  • Verify account/plan/rate-limit endpoints/events and document which observations are authoritative.
  • Measure worker image size, cold start, auth restore, first-turn latency, memory/disk use and termination behavior in cloud-dev.
  • Verify subscription use does not silently switch to API-key billing.
  • Review relevant terms/automation constraints for the intended hosted flow.
  • Produce an explicit go/no-go result and fallback implications; do not hide missing telemetry.

Phase B: adapter

  • Implement /connect codex device-code state flow and tenant association.
  • Encrypt/store auth material outside YDB plaintext; persist only credential references/metadata in YDB.
  • Materialize a dedicated invocation-scoped CODEX_HOME and workspace.
  • Start/drive Codex through its machine protocol; stream structured progress into checkpoints.
  • Read provider-native quota/rate-limit information when exposed and map it to the scheduler without inventing remaining limits.
  • Implement disconnect, expired/revoked credential and re-authentication behavior.
  • Enforce tool/MCP allowlist, runtime/turn/input limits, cancellation and child-process termination.
  • Record model, provider observations, locally measured usage, wall time and structured errors.

Isolation and failure tests

  • Two tenants with different subscription connections never share auth homes or rate-limit state.
  • Warm container reuse does not expose prior credentials/workspace.
  • Timeout/SIGTERM after a checkpoint is safely retried or surfaced.
  • Exhausted provider quota produces blocked/reset state and no API-key fallback.
  • Disconnect invalidates future materialization without deleting audit history.

Acceptance criteria

  • The feasibility report has a clear supported/unsupported verdict backed by reproducible cloud-dev evidence.
  • If supported, one real dev-bot run completes through the standard worker contract and returns a result.
  • Provider vs local usage confidence is visible in YDB/admin status.
  • No credentials appear in logs, queue messages, artifacts or Terraform state.
  • Failure to prove subscription execution blocks production release and creates a deliberate alternative-harness decision, not an implicit API billing path.
likedislike
urandon
urandon成员
8月3日 评论:

Architecture dependency update: canonical session store

The accepted Option B decision in design #1 changes the implementation entry condition for this issue.

Codex feasibility research that does not modify product state may proceed independently, but the production adapter must not land on the legacy Telegram-history/context_epoch path. Adapter implementation and its real run acceptance now depend on:

  • #18 for the live cloud ingress/container contract;
  • SESSION-05 #24 for canonical snapshot/event context materialization;
  • SESSION-08 #27 for canonical cross-frontend/isolation acceptance.

Codex thread/session IDs remain attempt/checkpoint metadata. A completed Codex run must reference the canonical Sessionless session_id and triggering session_event_id, and finalization must use the SESSION-04 event/projection contract. No Codex auth cache, thread database or workspace becomes product history.

likedislike
urandonurandon成员
23 天前 关联了pull request:[MVP-10] Add bounded Codex App Server Phase A client
urandon
urandon成员
23 天前 评论:

Phase A feasibility/protocol slice merged

MR !48 merged no-ff as d1c33618b8afa8363671d79bfec043aa57d039f1 and was mirrored byte-for-byte to GitHub main.

Delivered:

  • dated feasibility/design record for codex-cli 0.148.0-alpha.15, stable schema SHA-256 a7cc806f2845736f1176418b97d8eefd239c2e049cb643eee405f1ce07ccb198 and explicit partial verdict;
  • bounded stable JSONL App Server client with isolated 0700 HOME/CODEX_HOME/workspace, sanitized env, frame/stderr/deadline limits, process-group kill/reap, device-code-only login, ChatGPT-only billing route, account/quota observations, read-only/no-tool thread/turn and graceful interrupt/cancel;
  • synthetic protocol recipes plus behavioral/race coverage for API-key rejection, sparse quota merge, unexpected tools/approvals, oversized/malformed frames, timeout and descendant teardown.

Independent review found one P1: a mid-run account/updated route change could be ignored. Exact follow-up ec55a08d7994b92de9f3b1d26dbc614b08c8a775 now invalidates apikey/lost auth, requires confirmed ChatGPT state before thread/start, and repeats account/read before returning terminal output. Resolution reviewer marked it RESOLVED.

Evidence:

  • feature exact-SHA CI run #152: all seven jobs green, including local stand, YDB, Terraform and reproducible five-image build;
  • post-merge CI run #153: Go/Web/Telegram/Terraform/YDB/local stand green; clean-room image reproducibility and cleanup green. The run fails only at the existing Publish immutable deployment images external boundary tracked by #34 (foundation Web repository/IAM has not been applied).

#13 remains open. Phase B still needs the credential-vault issuance/revoke boundary and Manager/HarnessDriver wiring, consented device-code/auth-refresh evidence, then real cloud-dev measurement and hosted-use policy approval. There is still no API-key fallback and no product-state wiring in this merged slice.

likedislike
urandon
urandon成员
23 天前 评论:

Phase B progress update:

  • #58 is merged/closed: personal compute resource resolution is now owner-scoped, exact-SHA feature CI is fully green, and merge-SHA core/YDB/local-stand/reproducibility checks are green.
  • The next autonomous bounded slice is tracked as #59: invocation-scoped credential lifecycle and crash-safe writeback.
  • #59 intentionally remains local/provider-neutral: versioned binding, active lease/run/attempt fencing, one-shot handle, private materialization, generation CAS, recoverable candidate cleanup, deny-first disconnect, race/redaction tests.
  • It does not activate Codex in worker-runtime, add cloud secret persistence, or claim consented cloud/policy acceptance. Those remain gated by #18 and the remaining Phase B/C evidence in this issue.

Implementation branch: codex/session-59-credential-lifecycle-contract from merge 245d6d93….

likedislike
urandonurandon成员
23 天前 关联了pull request:Define invocation-scoped credential lifecycle
urandon
urandon成员
23 天前 评论:

Phase B0 credential lifecycle is complete in #59 / MR !50. The next bounded local slice is #60: Manager credential orchestration with independently authorized owner propagation, explicit required/disabled mode, lease-window admission, lifecycle finalize/cleanup, and local fake backends. It intentionally leaves real Codex/runtime/cloud/provider activation behind #18 and later #13 slices.

likedislike
urandonurandon成员
23 天前 关联了pull request:Prove credential-bearing worker orchestration
urandon
urandon成员
23 天前 评论:

Phase B1 Manager orchestration is complete in #60 / MR !51. The next local-only slice is #61: prepared borrowed CODEX_HOME/workdir process ownership plus a fake-protocol one-turn codexharness. It does not activate worker-runtime or real provider login and preserves the #60 long-initial-lease fail-closed gate.

likedislike
urandon
urandon成员
22 天前 评论:

Research-first pause and integration-surface gate (2026-08-23)

Implementation after #60 is paused while current primary documentation and competitor source are reviewed.

New official OpenAI docs create a required design decision:

The next decision must compare SDK, App Server, and MCP/non-interactive CLI against the existing Sessionless harness, credential lifecycle, cancellation, checkpoint, quota, packaging, and scale-to-zero constraints. No real login/consent or provider call is being performed during research.

likedislike
urandonurandon成员
21 天前 关联了pull request:[Research] Decide Codex integration surface and credential locality
urandon
urandon成员
20 天前 评论:

#64 is complete as a conditional/negative spike. The production-shaped subscription path is now explicitly Go-only and attached-worker-first: AW-01→AW-05 establish owner-scoped identity/protocol/fenced dispatch/daemon, then #81 codex exec adapter, followed by #79 two-owner security evidence. #61 App Server implementation is superseded rather than activated.

#13 remains open. It cannot claim production go until #48 authorizes the exact provider/entitlement/placement/custody tuple, supported route/quota policy is resolved, and the attached-worker isolation/security gates pass. Python SDK, App Server, cloud custody, private API, and API-billing fallback remain prohibited.

likedislike
urandonurandon成员
19 天前 添加了label:harnessprovider
urandonurandon成员
19 天前 关联了里程碑:MVP — Provider & harness (#13)
urandonurandon成员
10 天前 关联了pull request:Define the Sessionless-owned serverless harness runtime
urandon
urandon成员
10 天前 评论:

Provider/harness progress sync (2026-09-04):

  • #85 / Provider PR-05a is accepted and closed after target-main MR !76 merged. Exact head fa2dad18560f06db8d553c9194c72f8eb34d2ab6 passed GitHub Actions run 33874926932, macOS/Linux validation, and a complete security diff review with zero reportable findings. The capability remains feature-disabled pending a production secret store and ingress cutover.
  • #86 / Provider PR-03 serverless-harness design is accepted and decomposed into #87–#92. Target-main MR !77 is open at exact head 0232eb2ede744a757dc67ad4536bd76051c590df; GitHub Actions run 33877315128 is in progress. The old stacked !74 remains open for history pending explicit closure approval.
  • #87 already has an isolated worktree and a passing focused race-test baseline. Its existing commits will be moved onto the post-!76/post-!77 main only after those lower-layer merge gates are complete.

No provider key, live provider call, production route, or automatic fallback has been enabled.

likedislike
urandon
urandon成员
10 天前 评论:

Provider/harness critical-path update: target-main replacements !75 (closed conformance fixtures), !76 (owner-scoped credential ingestion), and !77 (Sessionless-owned serverless harness design) are now merged into main. #85 and #86 are accepted and closed with exact-SHA CI evidence. The next implementation slice is #87 (managed execution authority and fenced effect boundary); #88–#92 remain sequenced follow-ups.

likedislike
urandon
urandon成员
9 天前 评论:

MVP provider/harness critical-path update:

  • #87 / PR-03a is accepted and merged via !78 at main revision 551e6a34b719ae7c3bcfda567f9c6d649c768892;
  • exact-head CI run https://github.com/urandon/sessionless/actions/runs/33926744080 passed all seven jobs and both security scans reported zero findings;
  • GitHub mirror main now exact-matches the GitCode merge revision;
  • #88 / PR-03b is active in an isolated worktree on branch codex/serverless-isolation-launcher, fast-forwarded to that merged main;
  • the #88 implementation is intentionally feature-disabled and reuses AW-05 for process/filesystem/environment/output mechanics while adding exact serverless authority, finalization, residue, and taint gates.

The next dependency remains PR-03b → PR-03c (#89) → PR-03d (#90) → PR-03e (#91) → PR-03f (#92). No production provider or substrate is enabled before those gates complete.

likedislike
urandonurandon成员
8 天前 关联了pull request:[DEVX/Docs] Turn the README into a visual product showcase