10 Commits
Author SHA1 Message Date
jinye 9ebd2de171 feat(managed): add experimental Kubernetes deployment (#15492)
* feat(managed): add experimental Kubernetes Helm deployment

* feat(managed): add trusted-node tools and dedicated WebShell gateway

* test(web-shell): isolate Managed gateway in boot tests

* docs(managed): clarify Kubernetes gateway requirements

* fix(managed): align Helm workspace identity with runtime broker

* fix(web-shell): keep managed permission rules key distinct

* fix(managed): align Helm lint and web test boundaries

* codex: address PR review feedback (#15492)
2026-10-30 18:26:43 +00:00
jinyeandQwen-Coder f3af3dd857 refactor(managed-agent): Split server into Maven modules (#15871)
* refactor(managed-agent): split server into Maven modules

Separate contracts, orchestration, persistence, adapters, assembly, and verification while retaining the existing service delivery model. Move tests and build consumers together and document local evidence and pending CI acceptance.

Co-authored-by: Qwen-Coder <[email protected]>

* refactor(managed-agent): reduce configuration and SDK boilerplate

Co-authored-by: Qwen-Coder <[email protected]>

* refactor(managed-agent): narrow contracts and simplify test scaffolding

Co-authored-by: Qwen-Coder <[email protected]>

* fix(managed-agent): repair verification after module migration

Resolve shared fixtures and worker paths from the Maven module root, update CI packaging assertions, and align existing test fixtures with the extracted contracts. Restore restricted Workspace constructors and remove redundant test visibility changes without altering inherited MySQL coverage.

Co-authored-by: Qwen-Coder <[email protected]>

* test(managed-agent): align remaining Harness and OSS fixtures

Preserve SDK refusal messages and register the managed OSS adapter at fixture injection points. Keep the existing retry and client shutdown assertions intact.

Co-authored-by: Qwen-Coder <[email protected]>

* style(managed-agent): order Hosted cleanup Harness imports

Co-authored-by: Qwen-Coder <[email protected]>

* test(managed-agent): fix recovery smoke fixture and import order

Supply the required transcript coverage in the recovery browser fixture and wait for history before testing a complete handoff. Preserve its existing safety and submission assertions. Order the cleanup coordinator test imports for Checkstyle.

Co-authored-by: Qwen-Coder <[email protected]>

---------

Co-authored-by: Qwen-Coder <[email protected]>
2026-10-30 14:56:35 +00:00
Shaojin Wen 6ef3eaa2f2 feat(managed-agent): add an admin launcher for the maintenance entry points (#15772)
* feat(managed-agent): add an admin launcher for the maintenance entry points

The server has twelve offline maintenance entry points, but the reference
distribution only shipped a launcher for operator recovery. The docs ran
the rest from a module build, sometimes through a classified jar the
distribution does not ship.

bin/qwen-managed-agent-admin <command> now runs each entry point by a
short name from the server jar, through PropertiesLauncher, since every
classified jar is the same application with another main class. It lists
its commands without starting Java, exits 2 on an unknown command, and
loads config/application.yml as the other launchers do. Packaging fails
when a mapped class is missing or has no main method.

The deployment guide gains a maintenance-commands section that names the
W1_JDBC_* and K2_JDBC_* credentials the commands read. The server and K2
READMEs show the distribution form first, and the K2 module-build commands
use the plain server jar.

* docs(managed-agent): name the admin commands that read the Spring datasource

operator-recovery and resident-retirement start the server's Spring
configuration and take its datasource, so they read SPRING_DATASOURCE_*
and the other control-plane settings, not W1_JDBC_* or K2_JDBC_*. The
deployment guide and the design said every database command read its
own credentials; they now name the two exceptions, say to run them with
server.env loaded, and note that csi-protection opens no database.

The config template's list of launchers that default
SPRING_CONFIG_ADDITIONAL_LOCATION now includes the admin launcher, which
shares the server launcher's preamble instead of a copy of it. A test
now also fails when a class with a main method has no admin command.
2026-10-28 20:15:54 +08:00
易良andQwen-Coder a6ed0518df feat(managed-agent): support opt-in same-context Java embedding (#15718)
* feat(managed-agent): support opt-in same-context Java embedding

* fix(managed-agent): isolate embedded callback filter

* test(managed-agent): qualify fixture clock

* fix(managed-agent): preserve executable maintenance artifacts

* test(managed-agent): finish the by-name bean migration at test injection points

This PR moves managed-agent infrastructure to name-only beans
(@Bean(defaultCandidate = false) plus @Qualifier("managed*") at the
production consumer sites). The migration stopped short of the test
fixtures, which left two classes of breakage:

- ApplicationContextRunner slices registered unnamed JdbcTemplate,
  Clock, ObjectMapper, DataSource and PlatformTransactionManager beans
  that no longer match the production qualifier, so the context failed
  to load (EventTransportConfigurationTest,
  RuntimeRetentionConfigurationTest,
  ToolPublicationStorageConfigurationTest,
  ToolPublicationAsyncVerificationTest, EventTransportBrokerGate).
- Full-application suites autowired JdbcTemplate by type and silently
  got Spring Boot's plain auto-configured template instead of the
  schema-aware ManagedSchemaJdbcTemplate, which H2 rejects against the
  VARBINARY identity columns as "Values of types BINARY VARYING and
  CHARACTER VARYING are not comparable".

Apply the pattern the PR already establishes in
ManagedArtifactApiIntegrationTest (registerBean("managedAgentClock", ..))
and StandaloneDataSourceConfigurationTest (@Qualifier on the injection
point): name the fixture beans, qualify the injection points. Test-only;
no production code changes.

The 18 suites named by SDK Java (fast) go from Tests run: 583,
Failures: 25, Errors: 79 to Failures: 1, Errors: 0. The remaining
failure is acceptsClientBuiltCensusAfterTheDefinitionIsCommitted, which
needs packages/core/dist and fails identically before this change.
mvn checkstyle:check reports 0 violations.

Co-authored-by: Qwen-Coder <[email protected]>
Patrol-Run: qwen-pr-closeout/jmvr7204nyh

* test(managed-agent): qualify the last three plain-JdbcTemplate test injections

The by-name bean migration landed at fourteen injection points but left
three full-application suites still binding Spring Boot's plain
auto-configured jdbcTemplate instead of the schema-aware
ManagedSchemaJdbcTemplate. H2 rejects the resulting String-to-VARBINARY
comparisons, so SDK Java (fast) kept reporting Tests run: 5805,
Failures: 1, Errors: 3 across ManagedApprovalSelectionTest,
SurfaceAdmissionAcceptanceTest and WorkspaceSessionRetentionTest.

Apply the identical @Qualifier("managedJdbcTemplate") pattern at those
three field sites, plus the retention fixture's @Bean ManagedAgentStore
parameter: that suite's CI stack runs through
ManagedAgentStore.syncLifecycleClaim, and the store is built from that
parameter, so qualifying the field alone would not have cleared it.
Test-only; no production code changes.

Local managed-agent-server reactor on this change:
WorkspaceSessionRetentionTest 23/1/1 -> 23/0/0, the BINARY VARYING
signature drops from 7 occurrences to 1, and checkstyle reports 0
violations.

Co-authored-by: Qwen-Coder <[email protected]>
Patrol-Run: qwen-pr-closeout/jmvrdhhf0yo

* test(managed-agent): inject the broker gate's clock by its bean name

ExecutionConfiguration now registers managedAgentClock and
managedAgentExecutor with defaultCandidate = false so an embedding
context's own Clock/ExecutorService neither shadows nor is shadowed by
the control plane's, and every consumer resolves them by qualifier.
EventTransportBrokerGate still injected Clock by type, so the RocketMQ
lane failed to build the test instance: "No qualifying bean of type
'java.time.Clock' available". Qualify the field the same way the
production consumers and the gate's own startup() helper already do.

The other fields keep by-type injection: Boot's auto-configured
JdbcTemplate and ObjectMapper are default candidates, and this test
runs the whole application on H2.

* build(managed-agent): keep the packaging IT out of the failsafe selection

ManagedAgentPackagingIT reads the jars the package phase wrote and
needs managed.artifact.version, so the pom runs it from the dedicated
surefire artifact-packaging execution at integration-test with both
supplied. Its *IT name also matched failsafe's default includes, which
ran it a second time without the jars' version or the property:
standaloneArtifactsIncludeConfigurationWhileLibraryDoesNot opened
target/qwen-managed-agent-server-null.jar and
retirementLauncherLoadsFromExecutableJar could not load
org.springframework.boot.loader.launch.PropertiesLauncher from it.
Exclude it from failsafe next to the existing Hosted*IT exclusion; the
surefire execution stays the single, property-bearing run.

---------

Co-authored-by: Qwen-Coder <[email protected]>
2026-10-28 17:43:31 +08:00
jinyeandQwen-Coder 414efe80a7 feat(runtime): add resident workspace reclamation and reuse (#15729)
* feat(runtime): add resident workspace reclamation and reuse

Add administrator-driven cleanup receipts, atomic resident release, and explicit same-tenant handoff with retained files. Preserve uncertain outcomes, prior operation history, and exact ownership revisions across reuse.

Co-authored-by: Qwen-Coder <[email protected]>

* test(runtime): align retirement alias fixture with tenant ownership

Admit a same-tenant contender before sealing the original binding so the busy-volume assertion reaches reservation. Assert foreign-tenant registration is refused while an unrelated volume remains reservable.

Co-authored-by: Qwen-Coder <[email protected]>

---------

Co-authored-by: Qwen-Coder <[email protected]>
2026-10-28 13:04:05 +08:00
jinyeandQwen-Coder 33e80fc1aa fix(runtime): unblock independent resident workspaces and tool admission (#15457)
* docs(runtime): revise resident Workspace delivery scope

Remove complete CSI auditing from the first-release prerequisites and retain bounded retirement with ownership preserved. Record platform-managed reclamation as separately designed and qualified work.

Co-authored-by: Qwen-Coder <[email protected]>

* docs(runtime): distinguish withdrawal and acceptance baselines

Keep the historical audit withdrawal baseline separate from the source pinned for S1 qualification.

Co-authored-by: Qwen-Coder <[email protected]>

* docs(runtime): record resident cold placement acceptance blocker

Co-authored-by: Qwen-Coder <[email protected]>

* docs(runtime): record resident public tool admission blocker

Co-authored-by: Qwen-Coder <[email protected]>

* fix(runtime): unblock independent resident workspaces and tool admission

Keep independent resident mount paths distinct from storage ownership and reject unsupported tools before dispatch while preserving public Plan approval and existing unknown outcomes.

Co-authored-by: Qwen-Coder <[email protected]>

* fix(runtime): preserve hosted capability lookup compatibility

Limit resident capability discovery to file profiles, reuse validated warm metadata on legacy route absence, and allow failed queries to be retried. Preserve existing nonresident paths and fault-driver identity assertions.

Co-authored-by: Qwen-Coder <[email protected]>

* test(cli): drain pending hosted approval turns before teardown

Cancel and await the test-owned execution when approval observation or assertions fail, retaining the original happy-path awaits and timeout.

Co-authored-by: Qwen-Coder <[email protected]>

---------

Co-authored-by: Qwen-Coder <[email protected]>
2026-10-25 19:05:04 +08:00
jinyeandQwen-Coder a2b6af5db8 feat(runtime): add explicit idle resident Workspace retirement (#14765)
* feat(runtime): add private CSI node evidence and controlled creation

* test(ci): support CSI node evidence verification

* feat(runtime): coordinate original CSI physical retirement progress

* feat(runtime): add explicit idle resident workspace retirement

* codex: address PR review feedback (#14765)

---------

Co-authored-by: Qwen-Coder <[email protected]>
2026-10-20 17:17:37 +00:00
jinyeandQwen-Coder ad6f5b75ca docs(runtime): simplify CSI delivery around resident Workspaces (#14758)
* feat(runtime): add private CSI node evidence and controlled creation

* test(ci): support CSI node evidence verification

---------

Co-authored-by: Qwen-Coder <[email protected]>
2026-10-20 03:47:35 +00:00
jinye 2197d02941 refactor(managed-agent): organize server packages by responsibility (#14710) 2026-10-19 14:16:18 +00:00
jinye 91125fca63 feat(runtime): add resident Workspace file sessions (#14340) 2026-10-16 08:34:38 +00:00