-
Notifications
You must be signed in to change notification settings - Fork 0
feat(api): consolidate project-history stored-request GET and CLI #456
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
Draft
seonghobae
wants to merge
4
commits into
feat/project-history-retrieval-get-gap-003a
Choose a base branch
from
feat/project-history-stored-request-cli-gap-003a
base: feat/project-history-retrieval-get-gap-003a
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c7e0296
feat(api): retrieve stored project-history requests by extra-segment GET
seonghobae ade6e27
feat(api): mint project-history stored-request GET from a dedicated CLI
seonghobae 5e327b8
feat(api): fold project-history query CLI into landing vehicle
seonghobae f024362
test(api): reproduce project-history collection integrity failures
seonghobae 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,2 @@ | ||
| - `tepp_api` loopback `tepp-project-history query` mints a typed LineageWeave `POST /v1/project-histories` onto spawned `tepp-loopback` TCP (ADR 0061). Metric-free `temporal_association_only` JSON only. `tepp.scientific_acceptance.v1` never appears. Does not infer causality. Naruon is refused. Not temporal-context CLI, not export CLI, not persistence. | ||
| - Fail closed on HTTP field injection, duplicate or transfer-encoded framing, non-2xx stdout, and stdin/response payloads above the existing project-history wire limits. |
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-project-history-request get` mints LineageWeave stored-request GET onto spawned `tepp-loopback` TCP (ADR 0088). Metric-free; stored projection `inference_status` remains `temporal_association_only`. Does not infer causality. Naruon refused. `NaruonLiveService` stays POST-only. Does not re-open cancel lineages. Not GAP-010 Figma/export, not persistence. |
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 @@ | ||
| - `GET /v1/project-histories/{idempotency_key}/request` returns the accepted LineageWeave create request on `tepp-loopback` (ADR 0087). Metric-free; stored projection `inference_status` remains `temporal_association_only`. Does not infer causality. Naruon refused. `NaruonLiveService` stays POST-only. Does not re-open cancel lineages. Not GAP-010 Figma/export, not persistence. |
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,36 @@ | ||
| //! Operator CLI for loopback `LineageWeave` project-history POST. | ||
|
|
||
| use std::io::{self, IsTerminal}; | ||
| use std::process::ExitCode; | ||
|
|
||
| use tepp_api::{ | ||
| ApiError, ProjectHistoryCliInvocation, execute_project_history_cli, | ||
| read_project_history_cli_stdin, render_project_history_cli_stdout, | ||
| }; | ||
|
|
||
| fn main() -> ExitCode { | ||
| match run() { | ||
| Ok(()) => ExitCode::SUCCESS, | ||
| Err(error) => { | ||
| eprintln!("{error}"); | ||
| ExitCode::FAILURE | ||
| } | ||
| } | ||
| } | ||
|
|
||
| fn run() -> Result<(), ApiError> { | ||
| let args: Vec<String> = std::env::args().skip(1).collect(); | ||
| match args.first().map(String::as_str) { | ||
| Some("query") => run_query(&args), | ||
| _ => Err(ApiError::InvalidWirePayload), | ||
| } | ||
| } | ||
|
|
||
| fn run_query(args: &[String]) -> Result<(), ApiError> { | ||
| let body = read_project_history_cli_stdin(io::stdin().is_terminal(), io::stdin())?; | ||
| let invocation = ProjectHistoryCliInvocation::from_args(args, body)?; | ||
| let response = execute_project_history_cli(&invocation)?; | ||
| let stdout = render_project_history_cli_stdout(&invocation, &response)?; | ||
| println!("{stdout}"); | ||
| Ok(()) | ||
| } |
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,35 @@ | ||||||||||||||||||||||||||||
| //! Operator CLI for loopback `LineageWeave` project-history stored-request GET. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| use std::io::{self, IsTerminal}; | ||||||||||||||||||||||||||||
| use std::process::ExitCode; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| use tepp_api::{ | ||||||||||||||||||||||||||||
| ApiError, ProjectHistoryStoredRequestCliInvocation, execute_project_history_stored_request_cli, | ||||||||||||||||||||||||||||
| read_project_history_stored_request_cli_stdin, | ||||||||||||||||||||||||||||
| render_project_history_stored_request_cli_stdout, | ||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| fn main() -> ExitCode { | ||||||||||||||||||||||||||||
| match run() { | ||||||||||||||||||||||||||||
| Ok(()) => ExitCode::SUCCESS, | ||||||||||||||||||||||||||||
| Err(error) => { | ||||||||||||||||||||||||||||
| eprintln!("tepp-project-history-request: {error}"); | ||||||||||||||||||||||||||||
| ExitCode::FAILURE | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| fn run() -> Result<(), ApiError> { | ||||||||||||||||||||||||||||
| let args: Vec<String> = std::env::args().skip(1).collect(); | ||||||||||||||||||||||||||||
| let body = | ||||||||||||||||||||||||||||
| read_project_history_stored_request_cli_stdin(io::stdin().is_terminal(), io::stdin())?; | ||||||||||||||||||||||||||||
| let invocation = ProjectHistoryStoredRequestCliInvocation::from_args(&args, body)?; | ||||||||||||||||||||||||||||
| let response = execute_project_history_stored_request_cli(&invocation)?; | ||||||||||||||||||||||||||||
| let stdout = render_project_history_stored_request_cli_stdout(&invocation, &response)?; | ||||||||||||||||||||||||||||
| println!("{stdout}"); | ||||||||||||||||||||||||||||
| if (200..300).contains(&response.status_code) { | ||||||||||||||||||||||||||||
| Ok(()) | ||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||
| Err(ApiError::InvalidWirePayload) | ||||||||||||||||||||||||||||
|
Comment on lines
+28
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Failures print request-shaped output For any non-2xx response,
Suggested change
Was this helpful? React with 👍 or 👎 to provide feedback. |
||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
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
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.
📝 Info: Stored lookup preserves tenant scope
The registry key combines consumer, required tenant, and decoded caller key. Identical keys in different tenants remain isolated.
Was this helpful? React with 👍 or 👎 to provide feedback.