Skip to content

docs(prediction): add day2 verification record#3

Merged
qexore merged 32 commits into
mainfrom
feat/prediction-day2-verification-record
Jun 5, 2026
Merged

docs(prediction): add day2 verification record#3
qexore merged 32 commits into
mainfrom
feat/prediction-day2-verification-record

Conversation

@qexore

@qexore qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review gate: documentation only; do not use this PR as approval to merge, tag, deploy, publish SDK, or deploy realtime.

Summary

  • Add the Prediction Activities DAY2 verification record and acceptance directory.
  • Record deployed aggregation/services tags that already exist, topic/DDL/API/SDK evidence, and remaining gates.
  • Document the public API vs Future.news field comparison and response-shape differences.
  • Add the post-review release runbook:
    • merge services #29 first, pull latest main, create services v* tag from main, deploy tag image, retest deep pagination
    • refresh services #30 after #29 because of the known crates/infrastructure/src/database/prediction.rs conflict, rerun focused tests, then merge/tag/deploy market endpoint
    • merge SDK #10, pull latest main, then publish js-v*, rust-v*, py-v*, and go-v* tags
  • Add the concrete #29/#30 conflict-resolution note: preserve #30 market endpoint query refactor, insert #29 LIMIT 1 BY activity_id between ClickHouse ORDER BY and page LIMIT, and keep both #30 event/market SQL tests plus #29 dedup SQL test.
  • Keep realtime live receive and SDK live receive explicitly pending because realtime 先不部署 remains in force.

Latest verification recorded

  • Docs head: 63829d57869b6e441f2ec64607f82d1d47c54a92
  • Public API probe at 2026-06-05 07:54 CST: page 1/page 2 both 200 with 20+20 rows, duplicate activityId 0/0, 27 fields, Future.news mapped missing [], required missing [], latest lag about 31s.
  • Token filter returned 5 rows and all matched the requested token.
  • activity_type=buy/sell/inventory_adjust returned 3 matching rows each for the selected condition.
  • activity_type=redeem returned 0 rows for the selected condition but event-level redeem without condition_id returned 5 matching redeem rows, so the redeem filter path is live and the absence is market-specific.
  • Services #29 local validation at 2026-06-05 07:56 CST passed on head b7151a1: infra prediction tests 4/4, API schema tests, git diff --check.
  • Services #30 local validation at 2026-06-05 07:56 CST passed on head 1beaca3: infra prediction tests 5/5, API schema tests, git diff --check, OpenAPI smoke.
  • Services #29/#30 merge-tree conflict rechecked: single expected content conflict in crates/infrastructure/src/database/prediction.rs.

Validation

  • PASS: git diff --check
  • PASS: docs PR CI / Lark CI/CD Notification on latest head 63829d5

Not done here

  • No code merge.
  • No services or SDK tag.
  • No production deploy.
  • No SDK publish.
  • No realtime deployment.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Update: documentation now distinguishes the target single-prediction endpoint from the current production fallback.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Updated Day2 acceptance record for the latest review state: added services PR #30 market endpoint, refreshed SDK PR head to 1886bd2, captured event+market OpenAPI SDK methods, and kept the reviewer-before-merge/tag/deploy gate explicit.\n\nVerification in this docs update: git diff --check; Lark CI/CD Notification passed.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Updated the Day2 target/acceptance record after the latest SDK PR update:\n\n- SDK PR #10 head is now 4be0aa4 (0 behind / 15 ahead)\n- recorded the runtime dependency fix: @solana/web3.js, viem, and bs58 in TypeScript dependencies\n- recorded local verification: frozen pnpm install, focused ESLint for dependency-related files, tsup, vitest, diff check\n- refreshed SDK CI status: TypeScript build/format/lockfile/examples/tests green; TypeScript lint still baseline; Python tests/build/lockfile green but lint/format baseline; Go lint/test blocked by generated OpenAPI client imports/deps baseline; Rust checks mostly green with lint jobs still pending at snapshot\n\nNo merge/tag/deploy was performed.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Finalized the SDK CI snapshot in the Day2 record after the Rust checks completed: Rust build/format/format-examples/lint/lint-examples/lockfile/stable+beta tests are now recorded as passing.\n\nNo merge/tag/deploy was performed.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Updated the Day2 verification record in 8060c23.

Changes:

  • chainstream-sdk PR #10 head updated to 39e1ce6
  • SDK PR merge state recorded as CLEAN
  • GitHub Actions all-green matrix recorded for TypeScript, Rust, Go, and Python
  • release gate remains unchanged: reviewer confirmation required before merge/tag/publish; realtime remains not deployed

No merge/tag/deploy action taken.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Updated the Day2 verification record in 4dd9d05.

Changes:

  • chainstream-sdk PR #10 head updated to aa31a9d
  • recorded Go/Python prediction activity realtime stream support
  • recorded TypeScript/Rust/Go/Python enum-builder and short-payload parser coverage
  • recorded SDK PR all-green GitHub Actions after the Go/Python stream follow-up
  • release gate remains unchanged: reviewer confirmation required before merge/tag/publish; realtime remains not deployed

No merge/tag/deploy action taken.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Update at 945be85:

  • Recorded SDK PR #10 final head 9cb5f3a as 0 behind / 21 ahead with GitHub merge state CLEAN.
  • Added the final SDK PR green-check review note: https://github.com/chainstream-io/chainstream-sdk/pull/10#issuecomment-4626033235
  • Recorded Go OpenAPI generation config: MODULES now includes prediction, and oapi-codegen uses -include-tags Prediction for go/openapi/prediction/client.gen.go.
  • No merge, tag, deploy, SDK publish, or realtime rollout has been done.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Update at ba717c1:

  • Recorded services PR #29 readiness: 0 behind / 1 ahead, head b7151a, merge state CLEAN, no repository checks configured.
  • Recorded services PR #30 readiness: 0 behind / 1 ahead, head 1beaca3, merge state CLEAN, no repository checks configured.
  • This is documentation-only evidence for review; no merge, tag, deploy, SDK publish, or realtime rollout has been done.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Update at d6fd70e:

  • Clarified the SDK REST/OpenAPI generation gap instead of narrowing the Day2 goal.
  • Current SDK PR has TypeScript/Rust REST methods generated from openapi.yaml, and Go/Python realtime stream support.
  • Go REST generation config exists, but go/openapi/prediction/client.gen.go is not committed.
  • Python OpenAPI generation would generate from the merged openapi.yaml, but current committed generated client has no prediction API/model files.
  • Local generator attempts were not reliable in this desktop environment: oapi-codegen v2.7.0 install was killed / hung, and java -version hung, so Python openapi-generator 7.11.0 could not be run locally.
  • No merge, tag, deploy, publish, or realtime rollout has been done.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Update at 00b9272:

  • Recorded SDK PR #10 latest head d0c245d as 0 behind / 22 ahead with merge state CLEAN.
  • Recorded Go REST SDK coverage: go/openapi/prediction/client.gen.go, client.Prediction, Go Linting green, Go Tests 1.23 / 1.24 green.
  • Updated remaining SDK REST gap to Python generated REST client only.
  • No merge, tag, deploy, SDK publish, or realtime rollout has been done.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Updated Day2 verification record after SDK PR #10 commit 32e7416.\n\nChanges recorded:\n- SDK PR is now 0 behind / 23 ahead at 32e7416, merge state CLEAN.\n- Python REST OpenAPI client coverage is complete: PredictionApi, PredictionActivitiesResponse, PredictionActivity, PredictionActivityOrder, PredictionActivityType.\n- Local Python focused tests: 7 passed; ruff format/check and import smoke passed.\n- GitHub Actions for SDK PR #10 are all green across TypeScript, Rust, Go, and Python.\n- Removed the previous pending item for Python REST generated-client coverage.\n\nNo merge/tag/deploy/publish action taken.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Docs PR final check at 6ffe929:\n\n- PR state: OPEN / CLEAN.\n- Lark CI/CD Notification: green.\n- Day2 verification record now reflects SDK PR #10 head 32e7416 and completed Python REST OpenAPI client coverage.\n\nNo merge action taken; keeping this ready for review.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Added fresh public API verification at docs commit f6e0fc6.\n\nNew evidence recorded:\n- Public event endpoint with condition_id returned 200 for world-cup-winner France condition.\n- Page 1 and page 2 returned 20 activities each; duplicate activityId count was 0 within page 1 and 0 across pages.\n- Activity item field count was 27; Future.news 23-field mapping had no missing fields.\n- token_id filter returned only the requested token.\n- activity_type probes for buy/sell/redeem/inventory_adjust returned matching samples.\n- Latest activity lag in that probe was about 195s.\n- Fresh kubectl log recheck was attempted but did not complete because read-only kubectl list calls did not return within 30s; kept that as a final-verification item instead of marking it passed.\n\nNo merge/tag/deploy action taken.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Added fresh production log/deployment verification at docs commit f550dea.\n\nNew evidence recorded:\n- Worked around local Homebrew aws CLI hang by generating EKS bearer token via local SigV4 presigned STS URL; Kubernetes /version returned 200, v1.35.4-eks-40737a8.\n- pol-prediction-trades-to-clickhouse-pipeline and pol-prediction-settlements-to-clickhouse-pipeline are 1/1 ready, restart 0, running deploy-prediction-activities-20260605-3e55e724.\n- chainstream/services is 2/2 ready, restart 0, running v1.20260605-prediction-activities.\n- PREDICTION_FIRSTSCREEN_CACHE_ENABLED is not set in services deployment and no chainstream ConfigMap override was found; code default remains false.\n- Last-hour log scan (tail 1500 lines per pod) found 0 decode/cache/prediction activity/panic/fatal/generic error matches across trades sink, settlements sink, and both services pods.\n- CH_INSERT_OK is present in prediction sink logs.\n\nNo merge/tag/deploy action taken.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Added code-level evidence at docs commit e29224b.\n\nNew verification details recorded:\n- Aggregation deployment YAML explicitly sets PREDICTION_FIRSTSCREEN_CACHE_ENABLED=false and TTL 86400 for both Polygon prediction trades and settlements sinks.\n- prediction-to-clickhouse-pipeline/src/activity.rs only calls write_firstscreen_cache when prediction_firstscreen_cache_enabled() is true; no firstscreen queue write path was found.\n- prediction-to-clickhouse-pipeline/src/model.rs maps buy/sell taker from trade_buyer/trade_seller and maps redemption/split/merge to redeem/inventory_adjust, with settlement mapping tests named in the record.\n- services firstscreen read gate defaults to false and only allows first unfiltered desc page when enabled; test name recorded.\n- SDK channel-builder and parser file evidence recorded across TypeScript/Rust/Go/Python.\n\nNo merge/tag/deploy action taken.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Added a Day2 completion matrix at docs commit 1945371.\n\nThe matrix now separates:\n- Verified items: activity data chain, topic retention, ClickHouse TTL, event REST field parity, firstscreen default-off gate, production logs.\n- PR-ready items not yet deployed/published: services #29, services #30, SDK #10.\n- Explicit remaining gates: reviewer confirmation, merge from latest main, tag/deploy or tag/publish, PR #29 deep-pagination retest, PR #30 market endpoint public retest, realtime pred namespace/live receive, SDK live receive.\n\nNo merge/tag/deploy action taken.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Added a fresh public API probe at 2026-06-05 07:44 CST. Result: event+condition activities endpoint returned 200 for page 1 and page 2, 20+20 rows, no duplicate activityId within page 1 or across pages, 27 fields, Future.news 23-field mapping missing [], required missing [], type counts buy=16/sell=16/inventory_adjust=8, latest lag about 38s. No deploy/merge/tag performed.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Added a post-review release runbook to the DAY2 acceptance doc. It now spells out the exact gated order: merge #29 -> pull services main -> create/push v* services tag -> wait CD image -> deploy and deep-pagination retest -> refresh #30 on latest main and resolve the known query-file conflict -> rerun focused tests -> merge/tag/deploy market endpoint -> merge SDK #10 -> pull SDK main -> publish js-v*/rust-v*/py-v*/go-v* tags. Also recorded the 2026-06-05 07:48 CST public API probe: 20+20 rows, duplicate activityId 0/0, 27 fields, Future.news mapping missing [], latest lag about 146s. No merge/tag/deploy performed.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Recorded the 2026-06-05 07:54 CST public API probe. Result: single-prediction event+condition endpoint returned 200 for page 1 and page 2, 20+20 rows, duplicate activityId 0/0, 27 fields, Future.news mapped missing [], required missing [], latest lag about 31s. Token filter returned 5/5 matching token rows. buy/sell/inventory_adjust filters returned 3 rows each with matching types. For redeem, the selected condition currently has 0 rows but event-level redeem without condition returns 5/5 redeem rows, so the filter path is live and current absence is market-specific. No merge/tag/deploy performed.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Recorded latest services PR validation from 2026-06-05 07:56 CST. PR #29 head b7151a1: infra prediction tests passed 4/4 including the dedup SQL test, API schema test passed in both api lib and data-service test binary, git diff --check passed. PR #30 head 1beaca3: infra prediction tests passed 5/5 including event slug filter and market condition-only SQL tests, API schema test passed in both binaries, git diff --check passed, and OpenAPI smoke confirmed both activity paths, schemas, enum schemas, and Prediction tag. Only existing warnings emitted. No merge/tag/deploy performed.

@qexore

qexore commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Added an explicit services #29/#30 conflict-resolution note to the DAY2 runbook. Merge-tree confirms the conflict is in crates/infrastructure/src/database/prediction.rs. Resolution after #29 merge: keep #30's market endpoint query refactor, insert #29's LIMIT 1 BY activity_id between the ClickHouse ORDER BY and page LIMIT, and keep both #30 event/market SQL tests plus #29's dedup SQL test. No code merge/tag/deploy performed.

@qexore

qexore commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Fresh public API probe at 2026-06-05 08:02 CST: event+condition endpoint returned 200 for page 1 and page 2, 20+20 rows, duplicate activityId 0/0, field count 27, Future.news mapped missing [], required missing [], latest lag about 75s, type counts buy=17/sell=17/inventory_adjust=6. Standard local kubectl read-only checks still timed out at 20s, so no new kube log/deploy evidence was added in this probe. No merge/tag/deploy/realtime action performed.

@qexore qexore merged commit 150331d into main Jun 5, 2026
2 checks passed
@qexore qexore deleted the feat/prediction-day2-verification-record branch June 5, 2026 10:17
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