[truealpha-datahub] Accept bounded raw source interaction - #192
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR advances the D3 Staging TOPT capture batch from E1 to E2 in governance tracking, and introduces a batch-private E1 “raw interaction boundary” for Yahoo Chart: a frozen HTTP adapter + append-only in-memory raw-byte ledger + normalization step with bounded retries and content-addressed attempt evidence.
Changes:
- Advance governance tracking for the D3 batch to target rung E2 and update the batch manifest (revision/base SHA/accepted slice details).
- Add
e1_slice.pyimplementing bounded HTTP attempts, raw-byte landing, normalization, and content-addressed interaction IDs. - Add an E1 test suite validating raw-byte retention, retry/attempt budgeting, and fail-closed behavior across retryable/terminal/transport/normalization outcomes.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| governance/vision-issue-graph.json | Advances the D3 batch target rung to E2 and updates the manifest hash pointer. |
| governance/batches/D3-staging-topt-capture.v1.json | Updates batch revision, base SHA, accepted slice state/claim ceiling, and E1 evidence fields before targeting E2. |
| apps/data-engine/src/data_engine/batches/staging_topt_capture/e1_slice.py | Adds the E1 raw interaction boundary: HTTP adapter, in-memory raw ledger, attempt evidence, and normalization. |
| apps/data-engine/tests/batches/staging_topt_capture/test_e1_slice.py | Adds tests covering bounded retries, raw-byte landing semantics, drift rejection, and fail-closed behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+114
to
+121
| payload = { | ||
| "call_plan_id": response.call_plan_id, | ||
| "attempt_number": response.attempt_number, | ||
| "landing_number": landing_number, | ||
| "status_code": response.status_code, | ||
| "fetched_at": response.fetched_at.isoformat(), | ||
| "raw_object_id": response.raw_object_id, | ||
| } |
Comment on lines
+130
to
+131
| def contains(self, landed: LandedRawResponse) -> bool: | ||
| return any(entry is landed for entry in self._entries) |
Comment on lines
+279
to
+280
| if self.source_call_count != len(self.attempts): | ||
| raise ValueError("source call count does not match attempt evidence") |
This was referenced Jul 14, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Acceptance evidence
make check: 699 passed, 4 skipped; Ruff, formatting, mypy, web typecheck, contract conformance, and delivery governance passedd62131fc54742e17594cda71518c10568db903c4Claim ceiling
This accepts one frozen, mocked HTTP source interaction with exact in-memory raw-byte retention, bounded retries, and observable calls. It adds no durable persistence, live Staging run, schedule, strategy, Production access, or release activation.
Advances #171.