-
Notifications
You must be signed in to change notification settings - Fork 0
feat(api): poll analysis-run status from LineageWeave on loopback #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
seonghobae
wants to merge
1
commit into
feat/scientific-acceptance-http-status-gap-003a
from
feat/analysis-run-status-consumer-parity-gap-003a
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - `tepp_api` adds `lineageweave_analysis_run_status_exchange` and a `tepp-loopback` TCP GET-status proof (ADR 0028). Metric-free accepted/running GET is unchanged from ADR 0027. `NaruonLiveService` stays POST-only. Not lifecycle POST, not cancel, not an ADR 0014 claim. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # ADR 0028 — Analysis-run status consumer parity | ||
|
|
||
| **Decision status:** Accepted | ||
| **Implementation maturity:** active-PR | ||
| **Date:** 2026-08-31 | ||
| **Supersedes:** None; complements ADR 0027 and ADR 0018. Does not supersede ADR 0014. ADR 0026 remains on other GAP-003A slices. This ADR number is unique on the GET-status lineage; other live PRs may reuse 0028 on unrelated stacks. | ||
|
|
||
| ## Context | ||
|
|
||
| ADR 0027 added `GET /v1/analysis-runs/{run_id}` on `AnalysisRunLiveService` and a Naruon status-exchange builder. `LineageWeave` had a create-exchange builder but no status-exchange, so a published consumer would have to mint a Naruon-labelled GET. The packaged `tepp-loopback` binary had no TCP proof that status GET works on the shared listener. | ||
|
|
||
| Duplicating the GET listener, lifecycle POST, cancel HTTP, collection GET, retry, or engine-library slices would not close this consumer-parity gap. Opening GET on `NaruonLiveService` would violate that listener's POST-only Naruon compatibility contract. | ||
|
|
||
| ## Decision | ||
|
|
||
| - `lineageweave_analysis_run_status_exchange` reuses the Naruon status builder and replaces only `tepp-consumer`. | ||
| - `AnalysisRunLiveService` remains the shared GET listener. LineageWeave consumers poll their own runs there; Naruon runs stay isolated. | ||
| - `NaruonLiveService` stays POST-only. It does not serve GET status. | ||
| - `tepp-loopback` proves create-then-GET over loopback TCP with the LineageWeave consumer. | ||
| - Accepted GET bodies stay metric-free. Scientific-acceptance attachment remains the ADR 0027 succeeded-profile gate. | ||
|
|
||
| ## Non-goals | ||
|
|
||
| - A second GET listener, running/terminal POST, collection GET, retry, persistence, or production TLS. | ||
| - Opening `NaruonLiveService` to GET or to LineageWeave. | ||
| - An ADR 0014 scientific claim. | ||
|
|
||
| ## Alternatives considered | ||
|
|
||
| 1. **Leave status GET only on the Naruon builder** — rejected because a published LineageWeave consumer would have to mint a Naruon-labelled GET. | ||
| 2. **Admit GET on `NaruonLiveService`** — rejected because that listener is Naruon-only POST (ADR 0011/0018). | ||
| 3. **Mint a second status DTO** — rejected as a duplicate of ADR 0027. | ||
| 4. **Consumer-parity status GET on the existing typed request** — accepted. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - Both published consumers can build a credential-free status GET exchange. | ||
| - Operators can observe LineageWeave status through `tepp-loopback` without a second HTTP stack. | ||
| - Naruon compatibility remains POST-only. | ||
|
|
||
| ## Failure and recovery | ||
|
|
||
| Non-`https` origins, empty or oversized run identities, credential headers, and consumer/idempotency mismatch fail closed. The in-memory registry is not durable. HTTP `200` on an accepted GET is not an ADR 0014 claim. | ||
|
|
||
| ## Security, privacy, scientific-integrity, and governance impact | ||
|
|
||
| - No credential headers cross the consumer boundary. | ||
| - GET remains loopback-only, size-bounded, and content-redacting. | ||
| - Metric-free accepted/running status is unchanged from ADR 0027. | ||
|
|
||
| ## Compatibility and migration | ||
|
|
||
| The existing POST analysis-run, temporal-context, project-history, and GET status paths are unchanged. Production adapters may replace loopback while preserving the LineageWeave consumer header on status GET. | ||
|
|
||
| ## Verification | ||
|
|
||
| Falsifiable evidence: | ||
|
|
||
| - LineageWeave status exchange sets only the published consumer header and uses GET; | ||
| - `tepp-loopback` create-then-GET over TCP returns `200` accepted without RMSE/scientific-acceptance keys; | ||
| - LineageWeave GET of its own run succeeds; Naruon GET of that run fails closed; | ||
| - Clippy `-D warnings`, `tepp_api` tests, rustdoc, and exact-head review remain required. | ||
|
|
||
| ## Rollback and supersession | ||
|
|
||
| Rollback removes the LineageWeave status builder and the TCP GET proof; the ADR 0027 GET listener remains valid. A superseding ADR is required to persist status, bind a public address, or treat HTTP success as an ADR 0014 claim. | ||
|
|
||
| ## Related authority | ||
|
|
||
| - ADR 0027 owns the loopback GET listener and Naruon status builder. | ||
| - ADR 0018 owns consumer-scoped ingress. | ||
| - ADR 0011 owns standalone/modular HTTP boundaries. | ||
| - ADR 0014 owns scientific claim promotion. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Empty status keys produce unusable requests
When the idempotency key is empty,
lineageweave_analysis_run_status_exchangestill returns a successful exchange. The listener rejects that generated request, so callers cannot poll the run.Was this helpful? React with 👍 or 👎 to provide feedback.