Skip to content

Enforce platform transaction handle lifetimes - #128

Merged
freeqaz-openai merged 1 commit into
codex/work-4f093aba450a3d088a059fa7from
codex/work-8ac03db200ba1d850e6a5f56
Sep 14, 2026
Merged

freeqaz-openai merged 1 commit into
codex/work-4f093aba450a3d088a059fa7from
codex/work-8ac03db200ba1d850e6a5f56

Conversation

@freeqaz-openai

@freeqaz-openai freeqaz-openai commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Repository handles retained after a platform transaction callback can mutate a published memory snapshot or query a released PostgreSQL client. Bind the existing stores' outward repositories to the callback lifetime: reject new calls after the callback settles and drain accepted complete operations before commit, rollback, or release. Read callbacks receive frozen projections containing only read methods, and worker queue/query access follows the same boundary.

Keep the existing inline resource implementations, interface ownership, and root package entrypoint. The reduced scope removes the resource extraction, generic factory API, error relocation, and fourteen subpath exports from the earlier version. Resource, audit, and work atomicity remain intact.

Dependency

This change follows #137's transaction-outcome fix. It adds lifetime enforcement to the same PostgreSQL owner while retaining every COMMIT, transport-error, and cleanup outcome branch. The combined production and test sources match the previously reviewed combination; the reordered stack makes each fix independently reviewable. There is no dependency on #129.

Validation

  • Fresh PostgreSQL lifetime/query/queue checks: 4 passed, 0 skipped.
  • Fresh real COMMIT-response faults: both executions passed (3 reported tests, 0 skipped).
  • Existing PostgreSQL platform workflows, including rollback Error identity and rejected escaped Agent mutation: 5 passed, 0 skipped.
  • Transaction-outcome protocol: 11 passed, 0 skipped.
  • TypeScript, workspace boundaries, formatting, CI suite audit, documentation length and all 17 documentation tests passed.
  • Earlier memory (4 passed) and singleton-worker (7 passed) proofs, including the lifetime regression comparisons, remain applicable to byte-identical implementations and tests. They were not broadly replayed for the dependency reorder.

The conflict resolution preserves the previously reviewed combined transaction owner exactly. The only complete-tree difference from that combination moves the existing outcome paragraph into the PostgreSQL guide.

Local SQL validation used PostgreSQL 16.15, fresh migrated private databases, and restricted application credentials; the owned server stopped afterward. CI's PostgreSQL 18.6 needs its own run on the updated head. These checks establish persistence and the selected controller/worker workflows, without claiming live runtime or GitHub token execution.

kevinslin
kevinslin previously approved these changes Sep 13, 2026

@kevinslin kevinslin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks fine but can we not use export maps? this isn't necessary and bloats the package manifest

@freeqaz-openai
freeqaz-openai force-pushed the codex/work-8ac03db200ba1d850e6a5f56 branch from f6b0c22 to cb22ec7 Compare September 14, 2026 07:49
@freeqaz-openai freeqaz-openai changed the title Extract resource repositories and enforce transaction lifetimes Enforce platform transaction handle lifetimes Sep 14, 2026
@freeqaz-openai
freeqaz-openai force-pushed the codex/work-8ac03db200ba1d850e6a5f56 branch from cb22ec7 to 977fd31 Compare September 14, 2026 11:27
@freeqaz-openai
freeqaz-openai changed the base branch from main to codex/work-4f093aba450a3d088a059fa7 September 14, 2026 11:27
@freeqaz-openai
freeqaz-openai force-pushed the codex/work-4f093aba450a3d088a059fa7 branch from 43a15c0 to 2e2084a Compare September 14, 2026 18:15
@freeqaz-openai
freeqaz-openai force-pushed the codex/work-8ac03db200ba1d850e6a5f56 branch from 977fd31 to 5f87ba8 Compare September 14, 2026 18:15
@freeqaz-openai
freeqaz-openai merged commit a2dc7ec into codex/work-4f093aba450a3d088a059fa7 Sep 14, 2026
13 of 19 checks passed
kevinlin-openai pushed a commit that referenced this pull request Sep 14, 2026
#137)

* fix: retain checked-out PostgreSQL transport failures

* fix: preserve exact PostgreSQL commit outcomes

* test: route PostgreSQL commit faults through effective endpoints

* Retain reviewed transaction scope on current main

* Enforce platform transaction handle lifetimes (#128)
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.

2 participants