Skip to content

Fix completion, run settings and concurrent cache state - #16

Merged
mikkel merged 1 commit into
mainfrom
codex/implicit-state-js
Nov 9, 2026
Merged

mikkel merged 1 commit into
mainfrom
codex/implicit-state-js

Conversation

@mikkel

@mikkel mikkel commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Active homepage runs could change backend/model halfway through a request, incomplete OpenAI-compatible streams could be treated as completed diffs, transient catalog failures persisted until reload, and concurrent disk-cache flushes could overwrite each other's records.

This patch snapshots run settings, injects the local strict completion client into live homepage generation/apply, rejects EOF without a terminal event and explicit length/filter stops, makes stream cleanup nonblocking, retries failed catalog loads, and invalidates credential-scoped pricing and picker buttons. Disk writers merge only dirty records under a shared Node/Python local-filesystem claim protocol with bounded waits and conservative abandoned-owner recovery.

Validation:

  • Full offline SDK suite: 274 passed, 4 live-inference tests skipped, including actual overlapping Node/Python cache writers.
  • TypeScript declaration generation and no-emit check passed; vendored landing modules match source exactly.
  • Deterministic benchmark: 128 examples / 135 file patches, 112 clean-correct, 23 mock fallbacks, zero silent wrong applies.
  • Landing module syntax and diff checks passed.
  • Independent review led to regressions for credential changes with an open picker, stalled cancellation, and no owner signaling on unsupported platforms.

Compatibility / release:

  • No package version bump, tag, release, npm publish, merge, or deployment is part of this PR. Existing release/UTF-8/binary fixes and PR [NOT FOR MERGE] npm 0.3.1 default-model-only release reference #15 are untouched.
  • OpenAI-compatible incomplete completions now reject as IncompleteCompletionError; streamed prefixes are not replayed automatically. Consumers should await completion before publishing changes.
  • Cache JSON and keys remain v1-compatible. All concurrent writers must upgrade together; a persistent .lock/ sidecar is added. See CACHE_PROTOCOL.md. Windows abandoned claims require manual inspection after writers stop; native Windows/power-loss/distributed-filesystem behavior was not exercised.
  • The commit begins with [CF-Pages-Skip], Cloudflare's documented GitHub-integration deployment skip. It deliberately uses no GitHub Actions skip token. Cloudflare project patchling was confirmed Git-connected, previews enabled for all branches, production main; post-publication verification confirmed record 7cdc301d-cd24-4591-bb15-a5b4f946e23e has is_skipped=true, all build/deploy stages idle with no start times, and production remains on b8b7936. GitHub CI run 42554395207 passed all five jobs (three Node versions, benchmark, version/changelog); no Cloudflare check was created.

Related drafts: 255BITS/patchling-py#34 and 255BITS/patchling-examples#6. No paid inference was run.

Deployment-skip references: https://developers.cloudflare.com/pages/configuration/git-integration/github-integration/ and https://docs.github.com/en/actions/how-tos/manage-workflow-runs/skip-workflow-runs .

@mikkel
mikkel marked this pull request as ready for review November 9, 2026 04:26
@mikkel
mikkel merged commit a75baa4 into main Nov 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant