Skip to content

Issue #3542: [Workflow] 生产 Host 未注册 deterministic_compute host_callback connector,#3526 能力上线但不可发现 - #3545

Open
eanz17 wants to merge 3 commits into
feat/2026-08-27_issue-3541from
feat/2026-08-27_issue-3542
Open

Issue #3542: [Workflow] 生产 Host 未注册 deterministic_compute host_callback connector,#3526 能力上线但不可发现#3545
eanz17 wants to merge 3 commits into
feat/2026-08-27_issue-3541from
feat/2026-08-27_issue-3542

Conversation

@eanz17

@eanz17 eanz17 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Issue

Closes #3542 — [Workflow] 生产 Host 未注册 deterministic_compute host_callback connector,#3526 能力上线但不可发现

Implementation summary

See .implement-loop/runs/implement-issue-3542.md.

Stacked-PR position

  • Base: feat/2026-08-27_issue-3541 (previous issue's branch)
  • Head: feat/2026-08-27_issue-3542
  • Auto-loop iteration: implement-loop / milestone Typed Context & Deterministic Computation (v1) follow-up

🤖 Generated by codex-implement-loop. Reviewer is a Claude subagent (see PR comments for round-N review reports).

eanzhao and others added 2 commits August 27, 2026 01:49
…ck connector,#3526 能力上线但不可发现

Implemented per .implement-loop/runs/implement-issue-3542.md.

Closes #3542

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pin MainnetHostBuilderExtensions.cs to the #3542 commit so architecture_guards.sh can pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@eanz17

eanz17 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Review of PR #3545 — round 1

Verdict: rework
Issue: #3542 — [Workflow] 生产 Host 未注册 deterministic_compute host_callback connector,#3526 能力上线但不可发现
Head: feat/2026-08-27_issue-3542 @ 9af09ad
Base: feat/2026-08-27_issue-3541
Reviewed by: Claude subagent (codex-implement-loop)

Verdict rationale

The issue is not documentation-only: Mainnet composition now registers a real host_callback connector named deterministic_compute with sha256_utf8, and MainnetHostCompositionTests proves runtime execute + ConnectorService catalog + ConnectorExternalWorkflowCapabilitySource READY on the real host. That covers the reported GET /api/connectors / authoring-source gap.

It is still not a pass. Host-owned catalog defaults are composed only on the Studio query-port path. A first-class catalog consumer — scheduled invocation connector evidence — still reads the raw scope projection and will not see deterministic_compute. Canon now claims the default is published into every Studio scope catalog; that claim is false for any reader that does not go through ActorBackedConnectorCatalogStore. That is query-time assembly of a second catalog authority, which CLAUDE.md rejects, and it is a concrete fail-closed hole for any scheduled workflow that consumes the newly advertised operation.

Findings

  1. Host catalog defaults are not the catalog. IHostConnectorCatalogDefaults is merged only in src/Aevatar.Studio.Infrastructure/ActorBacked/ActorBackedConnectorCatalogStore.cs (GetConnectorCatalogAsyncMergeHostConnectorDefaults). src/Aevatar.Studio.Projection/QueryPorts/ProjectionScheduledInvocationAuthorityQueryPorts.cs (ProjectionScheduledInvocationConnectorQueryPort) still unpacks ConnectorCatalogCurrentStateDocument and returns only actor-owned names. ScheduledInvocationAuthorizationPlanner then fail-closes with connector_authorization_evidence_not_found / connector_authorization_evidence_not_found:deterministic_compute when the required host-connector ref is missing, and with connector_authorization_evidence_not_found when the scope has never saved a catalog document at all (document == null → evidence null). Failure: author sha256_utf8 via the new READY descriptor, publish a scheduled member workflow, scheduled auth rejects a connector the authoring catalog just advertised. CLAUDE.md: 「聚合必须 actor 化:跨 actor 聚合/汇总/关联若有稳定业务语义,建模为 aggregate actor;禁止长期放在 query-time 拼装层。」and 「查询始终走 readmodel」. Fix: one catalog-name authority both GET/capability-source and scheduled evidence use (shared merge helper at minimum; do not leave host defaults as query-port-only decoration). Cover with a test that an empty/missing scope document plus Mainnet defaults still authorizes deterministic_compute.

  2. Save path does not preserve the composed catalog. SaveConnectorCatalogAsync persists and returns the caller payload, not the merged view. A client that GET+PUT will write the host default into the scope actor; a client that PUT only scope connectors gets a response without deterministic_compute even though the next GET adds it back. That makes Version / ETag describe actor state while GET Connectors describes actor+host, and makes scheduled evidence accidentally depend on whether someone happened to save the catalog. Residual of finding 1; do not treat GET+PUT as the publish mechanism.

What's good

  • Issue option 1 is implemented as Host composition rather than a node-local connectors.json edit; that matches production better than the issue's file-based example.
  • Runtime registration goes through HostCallbackConnectorBuilder.TryBuild and fails host startup on descriptor/allowlist mismatch; handler/operation ids are the SHA256DeterministicComputeHandler constants.
  • test/Aevatar.Capabilities.Tests/MainnetHostCompositionTests.cs is a real Mainnet start test: registry execute (abc → known sha256, host_callback.algorithm_version=1), ConnectorService.GetCatalogAsync handler/allowlist/text, and capability List+Inspect READY.
  • Scope connectors are preserved and same-name drift is overwritten (ConnectorExternalWorkflowCapabilitySourceTests).
  • docs/canon/connector.md records the default contract; conformance pin of MainnetHostBuilderExtensions.cs is stacked-PR-legitimate. No external-repo surface change. No new proto/JSON fact format.

REVIEW_VERDICT:rework:Host defaults missing from scheduled catalog evidence

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.40%. Comparing base (3e06783) to head (9af09ad).

@@                      Coverage Diff                       @@
##           feat/2026-08-27_issue-3541    #3545      +/-   ##
==============================================================
- Coverage                       83.41%   83.40%   -0.02%     
==============================================================
  Files                            1692     1692              
  Lines                          194065   194065              
  Branches                        23324    23324              
==============================================================
- Hits                           161889   161858      -31     
- Misses                          21327    21363      +36     
+ Partials                        10849    10844       -5     
Flag Coverage Δ
ci 83.40% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@eanz17

eanz17 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Review of PR #3545 — round 2

Verdict: pass
Issue: #3542 — [Workflow] 生产 Host 未注册 deterministic_compute host_callback connector,#3526 能力上线但不可发现
Head: feat/2026-08-27_issue-3542 @ 5f81f721dace9f715d38b00d6eddbb8cc5d89c6f
Base: feat/2026-08-27_issue-3541
Reviewed by: Claude subagent (codex-implement-loop)

Verdict rationale

Round-1's three blockers are present in this head as shared composition, not only as a fix-summary claim. IConnectorCatalogNameAuthority is the single name authority: Studio GET (ActorBackedConnectorCatalogStore.GetConnectorCatalogAsync) and scheduled evidence (ProjectionScheduledInvocationConnectorQueryPort) both compose through it, and capability discovery still goes through GET. Missing and valid-empty scope documents now return Host-backed evidence instead of null / actor-only names; malformed documents still fail closed. ScheduledInvocationAuthorizationPlanner fail-closes only when evidence is null or the required name is absent, and it accepts StateVersion >= 0, so empty/missing + Mainnet defaults authorize deterministic_compute. Scope PUT strips Host-owned names before dispatch and returns the composed view, so GET+PUT is not the publish path. Mainnet still registers runtime deterministic_compute / sha256_utf8 via HostCallbackConnectorBuilder and publishes the same definition as IHostConnectorCatalogDefaults. That is issue option 1.

Findings

None.

What's good

  • Issue option 1 is still Host composition, not a node-local connectors.json edit. Runtime register and catalog default share MainnetDeterministicComputeConnectorDefinition; builder mismatch still fails host start.
  • F1 is actually wired: AddStudioApplication registers the authority; Mainnet registers IHostConnectorCatalogDefaults; IScheduledInvocationConnectorEvidenceQueryPort consumes ComposeEnabledNames. MainnetHostCompositionTests asserts registry execute (abc → known sha256, host_callback.algorithm_version=1), ConnectorService catalog handler/allowlist/text, capability READY, and scheduled evidence contains deterministic_compute. ProjectionScheduledInvocationAuthorityQueryPortTests.ConnectorPort_WithMissingOrEmptyScopeCatalog_ShouldUseHostDefaults covers both missing and empty documents.
  • F2 is actually wired on the catalog save path: SelectScopeOwnedDefinitions drops Host-owned names; save returns ComposeDefinitions(scoped). Canon now states GET / capability source / scheduled evidence share the authority, PUT is not the publisher, and Version / ETag is only the writable scope actor.
  • Stacked-PR pin of MainnetHostBuilderExtensions.cs is 2f07e4ab… at both 4f5066066 and this head; no external-repo surface; no new proto/JSON fact format.

Residual (not blocking): ImportLocalCatalogAsync still persists the local file payload unfiltered and returns that uncomposed list. Stream import already goes through SaveCatalogAsync. Reads and scheduled evidence still overwrite Host-owned names, so this is not a publish or fail-closed hole.

Round comparison

  • Findings carried over from round 1: F1 (now resolved) / F2 (now resolved)
  • New findings this round: none
  • Net direction: improving

REVIEW_VERDICT:pass:Host defaults now reach scheduled evidence; GET+PUT is not publish

@eanzhao

eanzhao commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Merged into feature/integrate (now at 4eccaad5a). This PR's head commit is an ancestor of feature/integrate; GitHub could not auto-close it because its base is still the stacked branch. Needs a manual close by someone with write access.

Reviewed the merged result on top of 2cb4ebdb8 — no blocking findings, merged without changes. Verified: build 0 errors; Architecture 198, Capabilities 841, Studio 2479, AI 3492, Bootstrap 213 — 7224 passed, 0 failed; architecture_guards.sh and test_stability_guards.sh passed.

Note on the red runtime-main-flow-smoke check on this PR: it is not caused by this stack. I ran tools/ci/main_flow_runtime_smoke.sh against clean feature/integrate (2cb4ebdb8, none of #3541/#3542/#3543 applied) and it reproduces the identical failure — workflow_schedule_provisioning_failed / StudioScheduledCredentialMaterializationException. That is a pre-existing baseline defect in the scheduled-credential path and needs fixing separately.

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.

2 participants