Skip to content

Discuss request-lifetime ownership with inert characterization - #33

Draft
valzargaming wants to merge 2 commits into
masterfrom
docs/request-lifecycle-boundaries
Draft

valzargaming wants to merge 2 commits into
masterfrom
docs/request-lifecycle-boundaries

Conversation

@valzargaming

@valzargaming valzargaming commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Proposal-only draft for maintainer review

The owner questioned whether this belongs in the API library and explicitly requires reviewing the drafts before any merge. No merge/release is authorized. This PR changes no runtime code and does not implement cancellation or deadlines.

Placement recommendation

Application freshness, retry choices, permission policy and reconciliation belong in the consumer. An outer timeout protects business writes but does not remove queued HTTP work or cancel transport/retries. The existing DriverInterface injection route can support application-owned mitigation; limitations are documented rather than hidden.

A full generic lifecycle contract spans Request, Bucket, global queue, rate-limit waits, active transport and retries, including Promise v2/v3 ownership. That is not a safe small patch. The document proposes alternatives/invariants for review, not a settled API or a dependency on Civ13-specific concepts. Existing draft #26 is independent and unchanged.

Characterization evidence

Three finite inert tests describe current queued/active cancellation and 502/525 retry behavior. These known-gap assertions are not the desired future contract and must change if a future implementation fixes the gaps. No network driver, local HTTP server, credentials or event-loop run is used by the test.

A narrowly scoped read-only/no-secrets workflow runs only this file on PHP 8.4 with separately resolved React Promise 2 and 3. Composer scripts/plugins are disabled. Existing docs/version workflows and runtime behavior are unchanged. The workflow does not invoke composer test, which would start the repository's HTTP test server.

Base: 8fcbaca.
Current head: 3eaef0b.
Verified exact scope: three added files, no src changes. Static/YAML/patch checks completed; PHP was unavailable locally. Initial run 40563621407 failed dependency resolution before tests: existing development dependency psy/psysh ^0.10.6 was blocked by advisory PKSA-4s4z-t146-6123. Those failures are preserved. The revised workflow uses a separate Composer manifest with unchanged root runtime requirements/autoload plus PHPUnit only; it excludes unrelated dev tools without disabling advisory enforcement. Normal full-development installation remains unresolved and is not validated by this isolated harness. Current-head hosted characterization passed in run 40564539426: PHP 8.4 with React Promise v2.11.0 and v3.3.0 each passed 3 tests / 16 assertions. These characterize existing gaps; they do not demonstrate a runtime fix. No live Discord calls, bot activation, dependency upgrade, merge or release.

This branch has not been deployed

No deployments
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