Skip to content

feat(api): query cutoff-safe project history via loopback CLI - #420

Closed
seonghobae wants to merge 4 commits into
mainfrom
feat/project-history-cli-gap-003a
Closed

feat(api): query cutoff-safe project history via loopback CLI#420
seonghobae wants to merge 4 commits into
mainfrom
feat/project-history-cli-gap-003a

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Queue / DDD disposition

fold_into_landing_vehicle — this is a LineageWeave-facing Analysis Run application-adapter increment, not a bounded context and not an independent production candidate. Its unique behavior must be folded into the coherent project-history vehicle with #428/#431/#456 or a successor before predecessor closure. Keep this PR open as immutable implementation/review evidence until that source/test fold exists; do not merge it independently merely because it is Ready/mergeable.

Preserved behavior

Protected main already serves POST /v1/project-histories; this increment supplies the operator CLI for that existing application boundary:

  • tepp-project-history query sends a typed ProjectHistoryRequest to POST /v1/project-histories on tepp-loopback;
  • consumer remains lineageweave only; naruon and unpublished consumers fail closed;
  • stdout is metric-free and retains inference_status=temporal_association_only;
  • tepp.scientific_acceptance.v1, causal scoring and numerical authority never appear;
  • public bind/origin, credential-shaped flags, empty/hostile requests and unknown verbs fail closed;
  • this does not own persistence or a separate scientific model.

The original focused Rust/clippy/doc validation remains implementation evidence. Before the behavior is folded, compare current source rather than transferring old hosted results.

Architecture authority

The historical per-slice ADR 0061 reference is implementation lineage pending repository-wide normalization under #437; it does not create branch-local architecture authority. Project-history HTTP/CLI mechanics belong to the Analysis Run supporting context, while LineageWeave retains its source/project-history authorization and product-domain authority.

Landing rule

Do not close this PR until the selected surviving project-history landing vehicle contains the unique query-CLI code, refusals and tests. Once that ancestry/source fold is proven, preserve this discussion as predecessor evidence and close as superseded_by_fold. The surviving vehicle must then reacquire exact-head required workflows, resolved review conversations and the qualifying independent approval required by the then-live ruleset. No self-approval, predecessor evidence transfer, force push or protection bypass.

GAP-003A unique slice: tepp-project-history query mints typed
LineageWeave POST /v1/project-histories onto spawned tepp-loopback
TCP. Metric-free temporal_association_only JSON only. Naruon is
refused. Persistence remains GAP-003B. ADR 0061 unique vs main.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 40 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: ae44881d-f675-4674-a9bd-199b5195fd12

📥 Commits

Reviewing files that changed from the base of the PR and between 1bc02f5 and 0dc8b48.

📒 Files selected for processing (13)
  • CHANGELOG.d/project-history-cli.md
  • DOCUMENTATION.md
  • crates/tepp_api/Cargo.toml
  • crates/tepp_api/src/bin/tepp_project_history.rs
  • crates/tepp_api/src/lib.rs
  • crates/tepp_api/src/project_history.rs
  • crates/tepp_api/src/project_history_cli.rs
  • crates/tepp_api/tests/project_history_cli_contract.rs
  • docs/API_CONTRACT.md
  • docs/TRACEABILITY.md
  • docs/adr/0061-project-history-cli.md
  • docs/adr/README.md
  • docs/research/project-history-cli.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 1 new potential issue.

Devin Review

return Err(ApiError::InvalidWirePayload);
}
let projection = ProjectHistoryProjection::from_json(&response.body)?;
if projection != project_history_projection(&invocation.request)? {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: Response binding covers all fields

project_history_projection binds every deterministic response field to the request. A valid projection from another cutoff or differently named project cannot reach stdout.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

Devin Review

Comment on lines +14 to +16
Err(error) => {
eprintln!("{error}");
ExitCode::FAILURE

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: Error output remains redacted

ApiError renders only fixed messages, so CLI failures cannot echo request data, upstream bodies, or transport details.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +396 to +398
(value.trim() == value && !value.chars().any(char::is_control))
.then_some(())
.ok_or(ApiError::InvalidWirePayload)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: Whitespace rejection stays scoped

validate_http_field_value only validates idempotency keys. Project names, evidence, and identifiers retain their existing whitespace behavior.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@seonghobae
seonghobae marked this pull request as draft September 1, 2026 16:34
seonghobae added a commit that referenced this pull request Sep 1, 2026
Preserve #420 query CLI source, fail-closed transport/refusal behavior, contract tests, changelog fragment, and doctoring in the consolidated Analysis Run project-history adapter vehicle. Keep stored-request GET/CLI behavior intact. No new bounded context or architecture authority is created.

Copy link
Copy Markdown
Contributor Author

Superseded-by-fold evidence: surviving project-history landing vehicle #456 now has exact head 5e327b8c6238aa1f3777bac4390be32d58adcfac. Fold commit copied this PR's crates/tepp_api/src/project_history_cli.rs byte-for-byte (4b3dd9950d2328cbb7ed4d32aeb5ee2c19590435) and crates/tepp_api/tests/project_history_cli_contract.rs byte-for-byte (6740078cc42cefbf5d906603d6b55657eb8241d1), plus the tepp-project-history binary, changelog fragment and doctoring. #456's Cargo manifest now registers both the existing stored-request CLI and tepp-project-history, and lib.rs wires/exports the query CLI. The existing #456 project-history aggregate already applies the shared registry-identity control-character invariant, so the security behavior is preserved without duplicating the old helper. ADR 0061 remains here as historical implementation lineage rather than being copied as architecture authority. Hosted checks on #456's new head are fresh/queued and must pass before #456 itself advances; predecessor check evidence is not transferred.

@seonghobae seonghobae closed this Sep 1, 2026
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