Repository navigation
feat(server): expose read-only extraction diagnostics - #1796
Conversation
yep, let's move |
|
Capabilities exposes configuration, Supervisor state, and execution evidence as independent facts.
Reads use in-memory state, with no model probes or diagnostic database queries. Existing execution boundaries record outcomes; scheduling and retry behavior are unchanged. Observations start External worker configuration/state remain |
Zxf-xufeng
left a comment
There was a problem hiding this comment.
- [P2] Regenerate the Dify contract after changing OpenAPI
This PR updates openapi/powercontext.yaml but leaves integrations/dify/plugin/powercontext_dify/contract.json unchanged. Its stored openapi_sha256 therefore no longer matches the specification. I reproduced a failure of python -X utf8 integrations/dify/generate_contract.py --check on this PR, while the same check passes on the base commit. This check is part of make dify-test, so the dify-tools CI job cannot pass with the current generated artifact. Please regenerate and commit the Dify contract.
- [P2] Account for custom Memory workers in extraction configuration
At src/powercontext/builtin/runtime/composition.py:601, pipeline_configured only checks the parent process's contexts.memory_extraction. A custom Memory worker registered through artifact_processing_bindings can assemble its own extraction pipeline, yet diagnostics report configuration="unconfigured".
I reproduced this with a real spawned worker: it successfully created Memory revision 1 and durably acknowledged the invocation (1/1), while diagnostics still reported unconfigured alongside background.state="running" and a populated last_success_at. Please include registered local Memory bindings when determining the configuration status.
|
@Zxf-xufeng @Teingi Please re-review the fixes in commit 5f40ec5.
Validation: 90 focused Python regression/contract tests passed, along with Python/JS generation checks, Ruff, formatting, and the affected ty check. Python dependencies were copied from the local cache at the exact uv.lock versions into an isolated Docker workspace. No remote model or OceanBase acceptance is claimed. The full pre-commit hook run could not complete because isolated hook dependency installation failed; the existing regression and static checks passed, and CI still needs to confirm the full hook suite. |
Which issue or RFC does this PR close?
Related: Artifact Processing Supervisor RFC.
Rationale for this change
A capability boolean cannot distinguish missing extraction configuration, model failures, and worker crashes.
What changes are included in this PR?
Are there any user-facing changes?
GET /v1/capabilitiesadds a read-only extraction snapshot without model probes or diagnostic database queries. External configuration and execution state remain unknown. Observations start unverified and reset with the Runtime; historical success or failure is not a current health verdict. No migration.How was this change tested?
make checkmake contract-test(49 passed)make e2e-test(316 passed, 64 skipped)make docs-testTests cover missing configuration, model errors, worker crashes/timeouts, leader/standby roles, discovery failures, retained history, no-op flushes, and restart semantics. Model failures were injected; worker crash/timeout tests used real child processes. Lease-role tests used SQLite. No live model calls.
AI usage statement
Codex (GPT-6) assisted with implementation, tests, and PR preparation.