Repository navigation
feat(dream): expand reviewed artifact and tag revisions - #1716
Conversation
hidb4ai
left a comment
There was a problem hiding this comment.
Re-reviewed 0e601c29c2b2b8df085106beeec50f4e3da6aff9. The two previously reported issues are fixed: target-plus-independent-source proposals now reach approval, and exact Memory citations survive Skill reads through native APIs, HTTP, and the Python SDK.
The fresh real-model/OceanBase run completed generation, HTTP approval, replay, and restart readback for six operations. Topic Memory returned invalid_generation_output once; a separate real-model/OceanBase rerun completed the same flow. That failure remains unexplained, so this is not a clean first-pass result for all seven operations. Embeddings were disabled; installed hosts and SeekDB were not exercised.
One P2 remains in Memory-entry tag target evidence handling, detailed inline. Its database reproduction uses controlled generation output, separately from the real-model acceptance run.
hidb4ai
left a comment
There was a problem hiding this comment.
Re-reviewed 07411577f14ce9b775aa2e09d99707d384103793. The Memory-entry target-only finding is fixed: replaying the original counterexample on real OceanBase now produces needs_evidence with no candidate and no automatically promoted ancestor Source. Independently supported Memory tag proposals retain the exact basis citation and can be approved. Pending v2 candidates are rejected before tag writes; supported regeneration produces an approvable v3 candidate.
A fresh qwen3.7-plus/OceanBase run passed all seven Dream revision operations through normal workers, real HTTP submission and approval, idempotent replay, and restart readback. Topic Memory passed this first batch. Additional real-model Memory-entry tag requests returned needs_evidence for target-only input and completed approval, exact-citation preservation, tag readback and restart for independent support. No additional actionable correctness findings were established in the update. Embeddings were disabled; installed hosts and SeekDB were not exercised, and production migration acceptance remains outside this validation.
Zxf-xufeng
left a comment
There was a problem hiding this comment.
Implemented the two findings from the latest local review in 0b4dd71. The inline notes describe each fix. Validation: 230 relevant tests passed, 102 optional cases skipped; all pre-commit hooks and type checks passed. The new regressions failed before the fix and pass afterward. No RFC, API contract, or database schema changes are included. Live OceanBase/SeekDB acceptance was not rerun locally.
hidb4ai
left a comment
There was a problem hiding this comment.
Reviewed 0b4dd71c0e5f8189096f2958e79007440c438da2. The seven Dream operations completed generation, approval, sequential replay, and restart readback with the configured real Qwen model and isolated OceanBase databases. One remaining correctness issue is detailed inline: overlapping Memory approvals return 200/409 instead of replaying the stored approval result. This was reproduced on both SQLite and real OceanBase. Production upgrade readiness remains gated on the complete migration framework in #1772.
hidb4ai
left a comment
There was a problem hiding this comment.
Real-model diagnosis at ac8f9946 confirmed that a reproduced invalid_generation_output can come from Qwen returning outcome: "correct", which violates the unchanged Dream outcome enum. That rejection is expected. A separate PR-introduced accounting defect was independently verified through real OceanBase and the public statistics API; it is detailed inline.
hireview001
left a comment
There was a problem hiding this comment.
- Resolve merge conflicts with the target branch.
|
please update & resolve conflicts |
Which issue or RFC does this PR close?
Implements the Dream domain expansion in #1715 across A0/A1, B1, B2, and C. Database upgrade responsibilities follow #1771. This PR supplies the Dream contribution; the complete migration framework and production registration remain in #1772. Trusted evaluation services and evaluation approval gates are outside scope.
Rationale for this change
New evidence can correct existing knowledge, instructions, configuration, or classification. Dream proposes reviewed changes for Memory, Profile, Topic Memory, Handoff, managed Skill, Prompt, and Tag. Every proposal remains pending until an authorized reviewer approves its exact version against the current resource baseline. Existing automatic generation retains its own policy.
Existing databases must not be changed implicitly when a Server, Worker or SDK opens them. Dream supplies its schema changes and domain checks to the unified migration framework instead of owning another startup migration runner.
What changes are included in this PR?
/v1/candidates/*operations. Artifact and Tag proposals sharepc_candidate_headsandpc_candidate_versions, immutable history, one Inbox ordering and pagination, and typed approval results. Tag approval checks both ETag and content basis without fabricating an Artifact Revision.review_then_publish; approval publishes a revision eligible for explicitcontinue_latest(); it does not execute Continue, acknowledge receipt, or perform work.create_all.Are there any user-facing changes?
The six
/v1/artifact-candidates/*routes are removed directly, without aliases or redirects, as the explicit release exception in #1715. Clients must upgrade with the Server. Unpublished Catalog Change routes/tables have no production compatibility requirement. Extended Dream types useX-PowerContext-Dream-Contract: 2; this header does not restore removed Candidate routes.Production database upgrade remains gated on #1772. The contribution manifest is deliberately unregistered until the complete historical Server baseline, actual revision chain, release/client versions, task checks, startup readiness and SQLite/seekdb/OceanBase acceptance are available. #1772's four-table SQLite prototype is not sufficient. This branch rejects old Dream storage with
migration_requiredand versioned databases withmigration_framework_not_ready; it does not offer a fallback startup upgrade. Fresh development databases and existing complete unversioned development schemas remain usable for domain verification.Operators stop new Dream admissions and let the old workers drain before stopping all writers. Pending Candidates do not need to be decided before upgrade. Unfinished runs block with
dream_tasks_require_drain; unknown processing manifests block before DDL withunknown_processing_manifest.The framework owns locks, backup policy, transaction boundaries, revision tracking in
pc_schema_revision, interruption recovery and cleanup. Dream's retained snapshots survive normal startup and review. Its copy-comparison validator runs during stopped-write migration, not after ordinary reviews legitimately change active data.How was this change tested?
UV_NO_SYNC=1 make check contract-test: passed, including lock consistency, pre-commit hooks, core/integration type checks, 49 integration-manifest tests and 51 API/JavaScript contract tests.git diff --check: passed.Real seekdb/OceanBase migration and recovery acceptance remain in #1772; backend skips are not production upgrade evidence. The Dify plugin suite could not run locally because its required Python 3.12 download did not complete. Rust/IPC exporter validation was not run locally because the Rust toolchain is unavailable. Controlled generation tests verify behavior and transactions, not model-quality improvement.
AI usage statement
OpenAI Codex was used to implement and review the changes, update documentation, and write and run regression tests. Backend and framework acceptance limits are stated above.