Skip to content

refactor!: restore package layering in src - #2244

Open
jackie-cqz wants to merge 19 commits into
oceanbase:masterfrom
jackie-cqz:fix/src-layering
Open

jackie-cqz wants to merge 19 commits into
oceanbase:masterfrom
jackie-cqz:fix/src-layering

Conversation

@jackie-cqz

@jackie-cqz jackie-cqz commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

No tracking issue. This follows up on the Artifact Processing Supervisor
(RFC 1515, #1523),
which replaced the APScheduler path removed here.

Rationale for this change

A static import scan of src/powercontext (module-level, deferred, and TYPE_CHECKING imports) found lower layers
importing upper ones:

Edge Imports before After
builtin → server 23 (16 deferred into function bodies) 1 (annotation-only TYPE_CHECKING)
builtin → client 1 0
server → cli 3 0
service → cli 3 0

The deferred imports hid a cross-layer cycle: server/processing_security.py imported the runtime composition root at
module level while the runtime imported it back inside functions. Separately, the in-process APScheduler activation
path stayed in the runtime after #1523 removed its only caller.

What changes are included in this PR?

Three commits that can be reviewed one at a time:

  1. refactor(runtime): remove the legacy APScheduler scheduling path

    • Delete builtin/runtime/scheduler.py, BuiltinRuntime.start_scheduler, ScheduledSourceProcessor,
      ScheduledExperienceProcessor, the access-scoped scheduled runners in server/factory.py, and the Scope
      enumeration helpers that only fed them, together with their tests.
    • scheduler_path on open_builtin_runtime and create_server_app is deprecated: it is ignored and emits a
      DeprecationWarning. powercontext.paths.default_scheduler_path is removed.
    • APScheduler stays a dependency because cron bindings parse expressions with CronTrigger.
    • In-repository callers (98 keyword arguments across tests, examples, and scripts) and docs no longer pass or
      describe the scheduler sidecar.
  2. refactor(authz)!: move access control into the built-in runtime

    • powercontext.server.authz → powercontext.builtin.authz. It already depended only on Core and built-in
      persistence.
    • Processing-child security (WorkerSecuritySpec, WorkerSecurity, open_worker_security) moves to
      builtin/authz/worker.py. build_worker_security stays in server/processing_security.py because it reads
      ServerSettings.
    • DreamAuthorization (builtin/authz/dream.py) holds the recorded-principal checks processing children need. The
      Server's DreamAccess subclass adds the request-principal Review checks and request IDs.
    • The powercontext code command moves to powercontext.cli.code; the entry point is updated and the command is
      unchanged.
  3. refactor: move shared helpers out of the cli and client packages

    • powercontext.cli.env_file → powercontext.env_file (standard library only).
    • powercontext.cli.inference_notice → powercontext.server.inference_notice.
    • Credential redaction primitives → powercontext.redaction; powercontext.client.capture keeps capture-event
      rendering and uses them.
  4. Merge branch 'master' (fifteen merges): resolves conflicts with the reusable database upgrade framework
    (feat(migrations): complete the reusable database upgrade framework #2168), durable owner recovery (feat(authz): recover external owner writes from durable intents #2187), dedicated database provisioning (feat(storage): provision dedicated seekdb and oceanbase databases #2031), and the managed plugin
    framework (feat(artifact): add managed plugin framework and some example #2246), plus the v1.5.0 release preparation (chore(release): prepare v1.5.0 and refresh product screenshots #2395) and ownership migration when enabling
    enforcement (fix(access): support ownership migration when enabling enforcement #2304)

    • Keeps upstream's deployment_runner(settings, ...) and server/database_migration.py. The framework needs the
      full Server settings, so the access-control move no longer narrows that signature. This leaves one
      annotation-only (TYPE_CHECKING) builtin → server import, in
      builtin/persistence/migrations/deployment.py.
    • Points the upgrade release gate's MANAGED_INPUTS and its tests at src/powercontext/builtin/authz.
      managed_digest skips a missing directory silently, so without this the gate would have stopped covering
      access control.
    • Places feat(authz): recover external owner writes from durable intents #2187's new owner_recovery.py under builtin/authz and rewrites its imports, server/app.py,
      server/factory.py, and the new owner-recovery tests for the new package path. The only code from that PR in
      the scheduled-runner helpers this PR deletes was the owner-recovery session threaded through them; with no
      caller left, the helpers stay deleted.
    • For feat(storage): provision dedicated seekdb and oceanbase databases #2031: keeps both import sets in server/cli.py, takes the new test setup in
      tests/test_atomic_memory_migration_cli.py, and follows the moves into code that arrived with the merge: the
      new source_management gateway and the agent-tool-recovery evaluation server import access control from
      builtin.authz, tests/test_cli.py imports and patches the code command at powercontext.cli.code, and
      the two scheduler_path arguments added upstream are dropped.
    • Updates release/upgrade-support.json: the persistence digest, plus one rationale sentence in the existing
      style, kept alongside the rationale upstream added. The generated table and index DDL for all 76 persistence
      and access tables, including pc_access_owner_recovery, pc_source_write_plugins, and the plugin framework's
      tables, is identical to master on the SQLite and MySQL dialects, so no table layout or migration encoding
      changes. This is a maintainer-owned declaration; please confirm the wording.
    • For feat(artifact): add managed plugin framework and some example #2246 and the 36 other commits in the latest merge: upstream edited server/authz/profiles.py and
      service.py after this branch had moved them, and git applied those edits to builtin/authz. The new
      plugin-framework modules under builtin/runtime and their tests import access control from builtin.authz
      and the worker-side security from builtin.authz.worker, so the framework adds no new builtin → server
      import. Three follow-ups the merge needed: the perf_counter import that the first commit removed is
      restored because PreparedContext receipts (feat(context): add bounded PreparedContext receipts #2258) use it, two new tests (fix(tests): initialize native Code Server storage before seeding #2348) stop passing the removed
      scheduler argument to the harness helpers, and the CI change-selection test uses the new path of
      owner_recovery.py, which classifies the same way. ty found the two helper callers; a search for the
      scheduler_path= keyword could not, because they pass it positionally.
    • For the fifth merge (9c8f061c, 28 commits: the v1.5.0 release preparation (chore(release): prepare v1.5.0 and refresh product screenshots #2395), the Rust PowerContext
      Gateway executor (feat(gateway): add Rust PowerContext Gateway executor #2307) and its conversation-scoped injection (feat(gateway): inject prepared context into Responses requests #2400, fix(gateway): prepare once per user message within a conversation and replay it #2416, feat(gateway): inject by default in combined deployments for host conversations #2417), historical Server upgrade
      paths (fix(migrations): support historical Server upgrade paths #2394), and the final request and response privacy checks with their input-encoding evaluation (feat(inference): enforce final request and response privacy checks #2311)):
      the only textual conflict was release/upgrade-support.json,
      where upstream raised the target to 1.5.0 and extended the rationale for the historical upgrade paths. This PR
      keeps that text, re-appends its own sentence, and recomputes the digest; the gate passes. Six files added
      upstream still used moved or removed names: the input-encoding evaluation runner
      (evaluation/performance/input_encoding/runner.py) and four new tests passed scheduler_path, and three new
      tests imported from powercontext.server.authz. The runner's _open_runtime helper drops its scheduler_path
      parameter and the tests import from powercontext.builtin.authz; nothing else needed editing.
    • For the sixth merge (1190dcbb, 75 commits: ownership migration when enabling enforcement (fix(access): support ownership migration when enabling enforcement #2304), Source
      evidence declarations (feat(memory): persist versioned Source evidence and neutral Atomic Memory projection #2004), and Desktop Linux diagnostics (feat(desktop):add Linux disgnostics integration #2343)): fix(access): support ownership migration when enabling enforcement #2304 added
      server/authz/keys.py, which git placed at builtin/authz/keys.py by rename detection, and
      server/ownership.py, and it edited WorkerSecurity in server/processing_security.py, which this branch had
      split. The class lives in builtin/authz/worker.py, so the three bounded idempotency keys are applied there and
      processing_security.py keeps only build_worker_security. In server/app.py, factory.py, and cli.py the
      branch's builtin.authz imports are kept, plus bounded_idempotency_key and OwnerRecovery, which the new code
      uses; _scheduled_access_runners stays deleted. release/upgrade-support.json takes upstream's text for the new
      v1_5_0_002 and v1_5_0_003 revisions, re-appends this PR's sentence, and recomputes the digest. A new
      static_scope_bootstrap_would_grant method and the new ownership tests imported server.authz, and 18 calls in
      tests/e2e/test_access_ownership_migration.py plus two other tests passed scheduler_path; all are updated.
    • Upstream also raised the code-seekdb job timeout from 30 to 60 minutes in this range. The two
      code-seekdb (…, 0) failures on the previous head were that job hitting the 30-minute limit in the unified
      migrations step, and the same limit cancelled code-seekdb (3.11, 0) on master.
    • For the seventh merge (2853ed98, 2 commits: the website SEO and Markdown export changes (feat(website): improve SEO, Markdown exports, and community links #2454) and the
      OpenCode setting that turns prompt-time recall off (feat(opencode): add a setting that turns prompt-time recall off #2455)): textually clean. Neither commit touches src/, so
      nothing needed to follow the moves.
    • For the eighth merge (24e0017e, 61 commits: the managed observability stack (feat(observability): add managed monitoring stack and diagnostics #2388), the shared Skills
      refactor (refactor(plugins): share standard Skills across native hosts #2380), and the SQLite connection-worker drain (fix(sqlite): drain failed connection workers #2468)): two conflicts. server/cli.py keeps
      powercontext.env_file and adds the new observability notice import. release/upgrade-support.json takes
      upstream's text, re-appends this PR's sentence, and recomputes the digest after formatting; the gate passes.
      feat(observability): add managed monitoring stack and diagnostics #2388 added cli/observability_notice.py, which only the Server's CLI uses, so it moves to
      server/observability_notice.py like inference_notice did and the Server still imports nothing from cli.
      Eight other new files imported powercontext.cli.env_file or powercontext.server.authz, and five new calls in
      tests/test_provider_observability.py passed scheduler_path; all are updated.
    • The code-seekdb (3.11, 0) failure on the previous head was the unified migrations step reaching its 25-minute
      step limit (it ran 1513 s). The merge brings in ci(seekdb): distribute native migrations across three shards #2458, which splits that step across three shards and allows it
      40 minutes.
    • For the ninth merge (da03e70a, 80 commits: Source locators with revision v1_5_0_004 and the
      pc_artifact_source_locators relation, code evidence reuse (feat(context): reuse code evidence with per-file revalidation #2425), the MiniMax native plugin (feat(minimax): add native plugin setup and verification #2205), and the
      shared integration lifecycle helpers (refactor(integrations): generate the shared Python plugin helpers from one source #2318)): one conflict, in release/upgrade-support.json. It keeps the
      sentences upstream added for those changes, re-appends this PR's sentence, and recomputes the digest after
      formatting; the gate passes. The six new tests that passed scheduler_path (15 arguments) are updated. The new
      cli/minimax.py is imported only inside the CLI package, so it stays in place.
    • For the tenth merge (c4c95e46, 8 commits, among them native minimum_should_match filtering for OceanBase
      Atomic Memory (perf(oceanbase): use native minimum_should_match filtering #2498) and request authentication before body reads (fix(server): authenticate requests before reading their bodies #2512)): one conflict, in
      release/upgrade-support.json, resolved the same way. No merged commit adds a reference to a moved or removed name.
    • The failing CI on the previous head was the same 7 tests as in the test notes below, and master's own Main
      fails on them too: tests (3.11, e2e) failed with those 7 on ee3c1ee3, and tests (3.11, unit) failed on
      c4c95e46 with the Atomic Memory scoring test below. The jobs for other Python versions and Upgrade release gate were cancelled or skipped as a result.
    • For the eleventh merge (cfdb617c, 6 first-parent commits): textually clean. It brings in upstream's fixes for
      both failures above: the reconciliation tests now expect SourceSequenceLocator(sequence=…), and test(oceanbase): complete scoring connection double #2552 completes
      the scoring test's connection double. The 29 tests in those two files pass on the merged tree. No merged commit
      adds a reference to a moved or removed name, and the persistence digest is unchanged.
    • For the twelfth merge (2291237a, the v1.5.1 release preparation (chore(release): prepare PowerContext v1.5.1 #2558) and its Desktop contract qualification):
      textually clean, with no follow-up edits and an unchanged persistence digest. The previous head failed
      desktop-validation on all three platforms in cargo test
      (deployment_identity.rs:241, compatibility_verified); I could not run Rust locally. That job passed on
      master at 2291237a, and the range updates deployment_identity.rs, tests/common/mod.rs and
      compatibility.json, so I expect this merge to resolve it, but only the next CI run shows it.
    • On the previous head, four other jobs failed that master at 2291237a also failed: opendal-package (the same
      ty diagnostic at source.py:160, which I reproduced with make opendal-test on an unmodified master
      checkout), harness-validation / Acceptance (sqlite) and (oceanbase), and code-seekdb (3.11, 0). The seekdb
      failure differs in step (bootstrap here, unified migrations on master) but shows the same watchdog Timeout
      dumps, and its tests and fixtures are identical to upstream's; upstream fix(seekdb): stabilize diagnostics and schema compatibility checks #2518 is open for SeekDB test stability. I
      did not look into the harness failures beyond confirming master fails them as well.
    • On cc246ee7, opendal-package and the two harness-validation / Acceptance jobs failed. opendal-package was a
      base problem fixed upstream in feat(desktop): package and provision independent Ops resources #2503, which the thirteenth merge brings in. On the merged head (0cf83b53),
      opendal-package and Acceptance (sqlite) pass; the OceanBase Acceptance variant no longer runs on pull
      requests in the restructured workflow. I did not establish why Acceptance failed on cc246ee7 and passes now.
    • On 0cf83b53 the only failing job was dsh-package: one of 19 tests in the real DSH runtime suite
      (setup validates native include trees observed by a real DSH startup) failed, identically on an unmodified
      master checkout at d64381bf (18 passed, 1 failed in both trees), and dsh-package failed in the last
      completed master runs. The fourteenth merge brings in the DSH plugin UI (feat(dsh): add plugin UI and connection status #2569); with it the whole suite
      passes on this branch (19 of 19). I did not find out which change fixed the test.
    • For the thirteenth merge (1026e37d, 6 first-parent commits, among them feat(desktop): package and provision independent Ops resources #2503, the Pi extension tests against a
      real Server (test(pi): run the Pi extension against a real Server in CI #2531) and the harness workflow restructuring (ci: run native database acceptance nightly with reports #2526)): textually clean, with an unchanged
      persistence digest. One scheduler_path argument in the new tests/e2e/test_pi_service_chain.py is dropped.
    • For the fourteenth merge (923e3d4c, 9 first-parent commits, among them the SQLite Topic Memory per-Scope rowid
      ranges (perf(topic-memory): scope SQLite FTS writes and searches to per-Scope rowid ranges #2532), the DSH plugin UI (feat(dsh): add plugin UI and connection status #2569) and the Desktop local Server management (feat(desktop): implement local Server setup, recovery and management #2306)): one conflict, in
      release/upgrade-support.json, resolved as before, with the digest recomputed after formatting; the gate
      passes and the DDL of all 76 tables is identical to master. One scheduler_path argument in the new
      tests/e2e/test_opencode_service_chain.py is dropped.
    • The head after that merge (98f19c76) passed CI in full: 60 checks passed, 21 were skipped, and none failed. That
      includes dsh-package, opendal-package and harness-validation / Acceptance (sqlite).
    • For the fifteenth merge (1cb0e75d, 14 first-parent commits, among them the standalone seekdb maintenance
      identity (fix(migrations): recognize standalone seekdb in maintenance identity #2585), the processing status projection (feat(processing): add read-only artifact processing status inspection (part of #2130) #2568) and structured task stop reasons (feat(work): record structured task stop reasons #2580)): one
      conflict, in release/upgrade-support.json, resolved as before, with the digest recomputed after formatting; the
      gate passes and the DDL of all 76 tables is identical to master. Four follow-ups in new upstream tests: one
      server.authz import in tests/builtin/runtime/test_context_reuse.py, one scheduler_path argument each in
      tests/e2e/test_artifact_merge_experience.py and tests/test_dashboard.py, and, in
      tests/e2e/test_real_experience_skill_harness.py, a scheduler database path passed positionally to
      _start_server and _start_configured_server, which no longer take one (a search for scheduler_path= cannot
      find that form). The new builtin/processing_status.py imports only builtin modules.
  5. test(release): import the access-control types the installed release ships

    • The upgrade acceptance runs tests/release_upgrades/authorization_fixture.py under each installed release's
      own interpreter, before and after migration. The path rewrite in commit 2 made it import
      powercontext.builtin.authz, which PowerContext 1.3.0 does not have, so every 1.3.0 case failed with
      ModuleNotFoundError before migration started. The fixture now chooses the package with
      importlib.util.find_spec, and both the source and target authorization checks are unchanged.

Reverse edges that remain and are out of scope: server → service (5 imports in database_migration.py, where
db-migrate stops the personal service before migrating, and in the newer database_admission.py), and one
core → builtin import in artifacts/indexes.py that #2246 introduced and this PR does not touch.

Are there any user-facing changes?

For Python SDK and embedding users, yes. There are no HTTP, MCP, CLI, configuration, or persisted-format changes.

  • Breaking: import access-control types from powercontext.builtin.authz instead of powercontext.server.authz.
    No alias is provided, because aliasing the old package path would load its submodules a second time and break
    isinstance checks. Jupyter tutorial 13 is updated.
  • Breaking: powercontext.cli.env_file is now powercontext.env_file. default_scheduler_path and the
    ScheduledSourceProcessor / ScheduledExperienceProcessor exports are removed. known_secret_values and the
    sensitive-key constants are imported from powercontext.redaction; render_capture_event is unchanged.
  • Deprecated: the scheduler_path keyword on open_builtin_runtime and create_server_app.
  • Docs: the core protocol and remote-access development guides, the interfaces guide, and a status note in RFC 0019
    are updated in both locales.

How was this change tested?

  • After the latest merge of master (1b26eb3b): uv run python -m pytest -n auto --doctest-modules gives 10340
    passed, 1093 skipped, 8 failed. All 8 are
    tests/evaluation/test_jev_rerank_comparison.py::test_comparison_billing_through_persisted_candidates cases, which
    fail with PydanticAIConfigurationError because ANTHROPIC_BASE_URL is set in my shell; with that variable and
    ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN unset the file passes (37 passed). The four timing-bound tests that
    failed in the previous full run passed in this one. The four test files I edited in the merge pass on their own
    (106 passed, 11 skipped).
  • Every component of make check passes on 1b26eb3b when run separately: version-check, pinned workflow actions,
    integration-manifest-check, integration-guidance-check, upgrade-policy-check, uv lock --locked, all 11
    prek hooks, and ty check for the package (no diagnostics) and for the Pydantic AI integration. I ran them one by
    one because make check itself stopped on a network error while prek fetched its hook repositories on my machine.
  • test_enforced_mode_cannot_silently_start_without_authentication_or_provider depended on validation inside the
    removed scheduled runners. It now checks the background-principal guard through build_worker_security with a
    runnable family, and checks that a schedule with no runnable family is still rejected at startup.
  • DDL equivalence: the table and index DDL generated from the persistence and access metadata (76 tables) is
    byte-identical between master and this branch on the SQLite and MySQL dialects.
  • Added tests: scheduler_path is ignored with a DeprecationWarning and creates no sidecar, for both
    open_builtin_runtime and create_server_app.
  • Each of the three original commits, before the merge: ruff, ty check, and focused tests (369, 419, and 590 passed). The second commit's batch
    also reported fixture 'migration_backend' not found for one e2e test; the same pytest arguments produce the same
    error on master, and the test passes alone and in the full run.
  • Every moved or new module imports cleanly as the first import in a fresh interpreter. builtin/authz/dream.py keeps
    annotation-only imports under TYPE_CHECKING so it does not trigger the existing
    builtin.dream.service ↔ builtin.runtime import cycle.
  • Upgrade fixtures (commit 5): with the published 1.3.0 wheel and a wheel built from this branch, each installed in
    its own venv and run with python -I, the previous authorization_fixture.py reproduces the CI error under 1.3.0
    and the new one imports under both. processing_fixture.py and upgrade_database_probe.py also import under
    both.
  • Not run: make notebooks-test, real-service e2e (--run-real-e2e), tox across Python versions, and the
    installed-artifact upgrade acceptance matrix (upgrade-release.yml). The harness requires Linux process
    ownership and cannot run on macOS, so the migration and target-side phases are checked only by CI; only the
    policy check was run locally.

AI usage statement

Built with Claude Code. Claude Opus 5.5 did the analysis, implementation, tests, and commit split. Claude Sonnet 5.5
performed the initial read-only repository exploration through subagents, resolved the merge conflicts, and updated
this description. Changes were validated with the commands listed above.

🤖 Generated with Claude Code

jackie-cqz and others added 3 commits October 26, 2026 15:00
The Artifact Processing Supervisor replaced in-process APScheduler activation
in oceanbase#1523, which also removed the only `start_scheduler` call. The scheduler
module, `BuiltinRuntime.start_scheduler`, the scheduled Source and Experience
processors, the access-scoped runners the Server factory built for them, and
the Scope enumeration helpers that only fed them were left without production
callers.

Remove that path and its tests. APScheduler stays a dependency because cron
bindings still parse expressions with `CronTrigger`.

`scheduler_path` on `open_builtin_runtime` and `create_server_app` is now
deprecated: it is ignored and emits a DeprecationWarning. The
`default_scheduler_path` helper and the `ScheduledSourceProcessor` and
`ScheduledExperienceProcessor` exports are removed. In-repository callers,
examples, and docs no longer pass or describe the scheduler sidecar.

The enforced-mode startup test now checks the background-principal guard
through the supervisor's worker security, where it applies, and separately
checks that a schedule without a runnable family is rejected at startup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The built-in runtime imported `powercontext.server.authz` in 23 places, and
`server.processing_security` imported the runtime composition root while the
runtime lazily imported it back. Access control depends only on Core and
built-in persistence, so it belongs below the Server.

- Move `powercontext.server.authz` to `powercontext.builtin.authz`.
- Split processing security: the child-side `WorkerSecuritySpec`,
  `WorkerSecurity`, and `open_worker_security` move to
  `powercontext.builtin.authz.worker`; `build_worker_security`, which reads
  `ServerSettings`, stays in `powercontext.server.processing_security`.
- Split Dream access: `DreamAuthorization` in
  `powercontext.builtin.authz.dream` checks recorded Dream principals for
  processing children; the Server's `DreamAccess` subclass adds the
  request-principal Review checks and request IDs.
- `deployment_runner` takes the database configuration instead of
  `ServerSettings`.
- Move the `powercontext code` command to `powercontext.cli.code`.

The built-in package no longer imports `powercontext.server`.

BREAKING CHANGE: import access-control types from `powercontext.builtin.authz`
instead of `powercontext.server.authz`. No compatibility alias is provided,
because aliasing the old package path would load its submodules twice and
break `isinstance` checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Server and the personal service imported `powercontext.cli.env_file`
and `powercontext.cli.inference_notice`, and the built-in runtime imported
redaction helpers from `powercontext.client.capture`.

- Move the standard-library environment-file loader to
  `powercontext.env_file`.
- Move the inference capability notice to
  `powercontext.server.inference_notice`; the `cli` and `service` commands
  already depend on the Server package.
- Move the credential redaction primitives to `powercontext.redaction`.
  `powercontext.client.capture` keeps capture-event rendering and uses them.

Import `powercontext.env_file` instead of `powercontext.cli.env_file`, and
`known_secret_values` and the sensitive-key constants from
`powercontext.redaction`. `render_capture_event` is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 26, 2026 07:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@jackie-cqz

Copy link
Copy Markdown
Contributor Author

The only failing check is tests (3.12, e2e). The failure is in tests/e2e/test_zcode_service_chain.py::test_zcode_source_is_processed_and_recalled_in_a_new_session: the ZCode scope script that the test runs exits with {"status":"failed","code":"timeout"} (job log).

This looks like a flaky test rather than something this PR introduced:

  • The same test failed on unrelated PRs, for example run 40270843221 and run 40270828704, which are dependabot GitHub Actions bumps.
  • tests (3.11, e2e), tests (3.13, e2e) and tests (3.14, e2e) all pass on this PR.
  • The test passes locally (3 of 3 runs).

Could a maintainer please re-run the failed job? I don't have permission to re-run it myself.

Resolve conflicts with the reusable database upgrade framework (oceanbase#2168):

- Keep upstream's `deployment_runner(settings, ...)` and
  `server/database_migration.py`. The framework needs the full Server
  settings, so the narrower signature introduced with the access-control move
  no longer applies. The only remaining `builtin` -> `server` import is
  annotation-only (`TYPE_CHECKING`).
- Adopt upstream's reworked startup tests, and drop `scheduler_path` from them
  and from the tests the framework added.
- Point the upgrade release gate's managed inputs and its tests at
  `src/powercontext/builtin/authz`, so access control stays under the
  persistence compatibility review instead of silently leaving it.
- Update the persistence digest and append a rationale sentence. The generated
  table and index DDL for all 59 tables is identical to master on the SQLite
  and MySQL dialects.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 26, 2026 10:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@AlexStocks AlexStocks added the 1.5.0 v1.5.0 release tracking label Oct 27, 2026

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • Resolve merge conflicts with the target branch.

Resolve conflicts with durable owner recovery (oceanbase#2187), which added
`server/authz/owner_recovery.py` while this branch moved `server/authz` to
`builtin/authz`.

- Place `owner_recovery.py` under `builtin/authz` and point its imports, the
  Server's `app.py` and `factory.py`, and the new owner-recovery tests at the
  new package path.
- Keep the scheduled-runner helpers deleted: the owner-recovery change only
  threaded its session through `_scheduled_access_runners`, which no longer
  has a caller.
- Drop `scheduler_path` from the call sites upstream added, and update the new
  `ops` and release-upgrade fixtures for the moved `env_file` and `authz`
  modules.
- Merge the upgrade-support rationale with upstream's owner-recovery text and
  update the persistence digest. The generated table and index DDL for all 63
  tables, including `pc_access_owner_recovery`, is identical to master on the
  SQLite and MySQL dialects.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 28, 2026 08:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

…ships

The upgrade acceptance runs `authorization_fixture.py` under each installed
release's own interpreter, before and after migration. It imported
`PrincipalRef` from `powercontext.builtin.authz`, which exists only in the
target wheel. PowerContext 1.3.0 keeps access control in
`powercontext.server.authz`, so the source-side check failed with
`ModuleNotFoundError` before any migration ran, failing every 1.3.0 case.

Select the package with `importlib.util.find_spec` instead of a try/except, so
a broken built-in package still fails loudly on the target side instead of
silently falling back to the old path. Both the source and the target
authorization checks stay in place.

Checked against the published 1.3.0 wheel and the freshly built target wheel
under `python -I`: the previous fixture reproduces the CI error under 1.3.0,
and this one imports under both. The other two scripts run under historical
interpreters (`processing_fixture.py`, `upgrade_database_probe.py`) import
under both as well.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 16:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@jackie-cqz
jackie-cqz requested review from hidb4ai and hireview001 and a balanced review from Copilot October 30, 2026 16:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Copilot AI balanced review requested due to automatic review settings November 8, 2026 14:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Resolve the conflict with native minimum_should_match filtering for OceanBase
Atomic Memory (oceanbase#2498) and the 7 other commits that landed since the previous
merge.

- `release/upgrade-support.json`: keep the rationale sentence added upstream
  for OceanBase lexical retrieval, append the sentence about this branch's
  code-organization changes, and recompute the persistence digest after
  formatting. The generated table and index DDL for all 76 tables is
  identical to master on the SQLite and MySQL dialects.

None of the merged commits adds a reference to the moved or removed names, so
no other file needed to follow the access-control, scheduler, or helper moves.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 04:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@hidb4ai hidb4ai removed the 1.5.1 v1.5.1 release tracking label Nov 9, 2026
@AlexStocks AlexStocks added the 1.6.0 v1.6.0 release tracking label Nov 9, 2026
Bring in the 6 first-parent commits that landed since the previous merge,
including the fixes for the Atomic Memory reconciliation tests (they now expect
the stored Source sequence locator) and the OceanBase scoring connection double
(oceanbase#2552), which were failing on master and on this branch for the same reason.

The merge is textually clean. None of the merged commits adds a reference to
the moved or removed names, and the persistence digest in
`release/upgrade-support.json` is unchanged because the commits do not touch
the managed inputs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 08:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Bring in the v1.5.1 release preparation (oceanbase#2558) and the commits around it.
The merge is textually clean and needs no follow-up edits: none of the merged
commits references a moved or removed name, and the persistence digest in
`release/upgrade-support.json` is unchanged.

The merge also supplies the Desktop contract qualification and test-fixture
updates for v1.5.1, which the Desktop `cargo test` job needs: without them
`deployment_identity.rs` fails on `compatibility_verified`.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 16:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@PsiACE PsiACE left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks

@jackie-cqz

Copy link
Copy Markdown
Contributor Author

CI status on cc246ee7: 94 checks pass, and the only failures are opendal-package, harness-validation / Acceptance (sqlite) and harness-validation / Acceptance (oceanbase) (CI result is the aggregate). The Desktop validation jobs and code-seekdb pass on this head. I believe the three remaining failures come from the base rather than from this PR, with different levels of evidence.

opendal-package: reproduced on master. make opendal-test on an unmodified checkout of master at cc752d8a reports the same ty diagnostic as this PR (pydantic-discarded-extra-argument at integrations/opendal/src/powercontext_connector_opendal/source.py:160). integrations/opendal is identical in both trees, and this job also failed in the last three completed master runs (2291237a, 63f021d6 twice).

harness-validation / Acceptance: not reproduced, so this is an inference.

  • This PR's own commits do not touch e2e/bub, the Dockerfile or the Compose files, and e2e/bub is identical to master. The 197 tests under e2e/bub/tests pass on both trees (run from the repository root, without test_harbor_job_config.py, which needs the LoCoMo dataset), and the real-server e2e tests I could run locally pass on this branch (21 passed, 1 skipped).
  • master fails the same job in run 42744760796 and run 42615177843, but with a different symptom: the harness container cannot start (exec: "powercontext-e2e-container": executable file not found). Here the container starts and the harness reports No ACP summary file found with Mean: 0.000.
  • That second symptom also appears, with the same counts, on an unrelated branch: run 42757278091 (feat/2130-processing-status). The job has passed on at least one other PR (run 42752180608).
  • I could not run the harness locally (no working Docker on my machine), so I have not compared its score on this branch against master, and I did not find why the ACP agent produces no summary.

I do not have permission to rerun jobs. Could a maintainer rerun the two Acceptance jobs on this head? If either still fails, I will investigate it on this branch.

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Bring in the 6 first-parent commits that landed since the previous merge,
including the OpenDAL fix for the Pydantic diagnostic that failed
`opendal-package` on this branch and on master (oceanbase#2503), the Pi extension
tests against a real Server (oceanbase#2531), and the harness workflow restructuring
(oceanbase#2526).

The merge is textually clean. The persistence digest in
`release/upgrade-support.json` is unchanged. The new Pi service chain test
passed the removed `scheduler_path` argument to `create_server_app`, so that
argument is dropped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 03:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@jackie-cqz

Copy link
Copy Markdown
Contributor Author

CI status on 0cf83b53 (the earlier status comment on cc246ee7 is superseded): 58 checks pass, 21 are skipped, and the only failing job is dsh-package (CI result is the aggregate). opendal-package and harness-validation / Acceptance (sqlite), which failed on the previous head, pass now. opendal-package was fixed upstream in #2503, which this head includes. I do not know why Acceptance failed before and passes now.

dsh-package fails on master too. One of the 19 tests in the real DSH runtime suite fails: setup validates native include trees observed by a real DSH startup (integrations/dsh/plugins/powercontext/tests/runtime/setup.test.mjs). The second powercontext setup dsh ... --json call in that test, which is expected to succeed, exits with code 1 and the test harness prints no output from it.

  • I reproduced it locally with pnpm --dir integrations/dsh/plugins/powercontext test:e2e:runtime --test-name-pattern="setup validates native include trees". On this branch it gives 18 passed and 1 failed; on an unmodified checkout of master at d64381bf it gives the same 18 passed and 1 failed, with the same test failing.
  • dsh-package also failed in the last completed master runs: run 42855450474 and run 42919036989 (both 1026e37d), and run 42951538729 (d64381bf).

I did not find the cause, because the test swallows the command's output and I did not reproduce the command by hand. So I can say the failure exists on the base, but not why. This PR moves powercontext.cli.env_file and powercontext.cli.inference_notice out of the cli package, but the other 18 DSH runtime tests, which call the same setup command, pass.

A rerun will not help here, since the same test fails on master. This needs a fix on the base; once that lands I will merge master again.

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • Resolve merge conflicts with the target branch.
  • CI failed: CI result (failure).
  • CI failed: dsh-package (failure).
  • CI failed: Main (failure). Failed steps: dsh-package / Test built plugin in the real DSH runtime; CI result / Require successful selected checks.

Resolve the conflict with the SQLite Topic Memory per-Scope rowid ranges
(oceanbase#2532) and the 10 other commits that landed since the previous merge,
including the DSH plugin UI (oceanbase#2569), which also fixes the DSH runtime test
that failed on master.

- `release/upgrade-support.json`: keep the rationale sentence added upstream
  for the Topic Memory full-text helper, append the sentence about this
  branch's code-organization changes, and recompute the persistence digest
  after formatting. The generated table and index DDL for all 76 tables is
  identical to master on the SQLite and MySQL dialects.
- The new OpenCode service chain test passed the removed `scheduler_path`
  argument to `create_server_app`, so that argument is dropped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 12, 2026 03:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • Resolve merge conflicts with the target branch.

Resolve the conflict with the standalone seekdb maintenance identity (oceanbase#2585)
and the 30 other commits that landed since the previous merge, including the
processing status projection (oceanbase#2568) and the structured task stop reasons
(oceanbase#2580).

- `release/upgrade-support.json`: keep the rationale sentence added upstream
  for the seekdb maintenance identity, append the sentence about this branch's
  code-organization changes, and recompute the persistence digest after
  formatting. The generated table and index DDL for all 76 tables is
  identical to master on the SQLite and MySQL dialects.

Follow the moves and removals into code that arrived with the merge:

- `tests/builtin/runtime/test_context_reuse.py` imports access control from
  `powercontext.builtin.authz`.
- The `scheduler_path` argument is dropped from the new calls in
  `test_artifact_merge_experience.py` and `test_dashboard.py`.
- The startup-deadline test in `test_real_experience_skill_harness.py` stops
  passing a scheduler database path to `_start_server` and
  `_start_configured_server`, which no longer take one. It passed the path
  positionally, so a search for the `scheduler_path=` keyword could not find it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 05:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.6.0 v1.6.0 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants