玉澜
4b0f71eedc
test: close changed-code coverage gaps to satisfy the coverage gate
...
- fetch_mcp_metadata: extract run()/resolveToken()/writeMetadata with
injectable deps (keychain, servers, lister, registry, exit); full-path
tests reach 100% file coverage.
- internal/cli: drop dead initSafetyByCLIPath (superseded by ResolveMeta),
split buildMetaByCLIPath / assembleSchemaCatalogSnapshot /
assembleCommandRegistryFrom / mergedCommandRegistryJSON so shard and
malformed-snapshot failure modes are testable; cover catalog structure
violation formatting (sort/truncate) and RenderSafetyAnnotation.
- generators: cover registry shard merge and catalog shard write failure
modes.
- helpers/cmdutil: cover LeafSpec default/server dispatch, transform error
propagation, default env hint, devapp member remove validate chain, and
the required-flags error helpers.
Local gate: overall 90.17% vs merge-base 89.96%, changed-code 100%
(861 statements); make policy and go test ./... green.
2026-07-28 18:05:20 +08:00
玉澜
c76c30a0b7
Merge upstream main into feat/command-surface-naming
2026-07-23 14:12:18 +08:00
玉澜
21cd3f8bc4
fix(schema): accept compatible CLI path separators
2026-07-21 19:18:07 +08:00
玉澜
51dc237d8a
feat: declarative LeafSpec command framework + schema generation/consumption separation
...
== LeafSpec command framework (internal/helpers/leaf.go) ==
Declarative command construction: LeafSpec/LeafFlag/NewLeafCommand with
Call (pluggable dispatch), LeafInt, PostMount, Trim, Validate. Collapses
per-command hand-written required validation, alias/env fallback, value
transform, and toolArgs assembly into one declarative path.
== devapp migration (28/31 commands) ==
All MCP-direct devapp leaf commands migrated to LeafSpec. Factories
(devAppCall/devAppCallCursor/devAppMeta) fold 33 repeated closures.
fakeDevAppRunner asserts toolArgs for every migrated command. 4 complex
commands (delete/robot submit/result/config) kept hand-written.
== Schema generation/consumption separation ==
- gen.go: isolated //go:generate pragmas from business code.
- command_meta.go: ResolveMeta(cliPath) -> CommandMeta{Identity,Safety,Selection}.
- command_safety.go: SafetyForCLIPath + RenderSafetyAnnotation; safety metadata
flows from embedded catalog into --help output.
- calendar.go HelpFunc fix: delegates to root HelpFunc at help-time.
- schema_catalog_structure.go: closed catalog structure validation gate.
== Registry + catalog per-product sharding ==
schema_command_registry and schema_catalog split into per-product shards,
eliminating concurrent-PR merge conflicts on these files.
== MCP metadata refresh tool ==
cmd/fetch_mcp_metadata: iterates 26 MCP server endpoints, merges with previous
data for cross-server interface_ref. make fetch-mcp-metadata target.
== AGENTS.md ==
Documents the generation/consumption split.
Verified: make policy exit 0, drift zero, all tests pass.
2026-07-19 09:38:43 +08:00
修雨
d8ffea02ab
test: close remaining coverage gaps
2026-07-15 15:19:25 +08:00
玉澜
2879683cad
fix(schema): enforce final delivery and runtime contracts
2026-07-14 08:11:27 +08:00
玉澜
6d97bf7204
Merge upstream/main into feat/schema-on-main
...
Complete the registry-first Schema delivery invariants, bind the event command surface, and preserve the event subprocess contract from main.
2026-07-14 01:25:05 +08:00
玉澜
f6c2ce655d
refactor(schema): unify registry-first delivery
2026-07-13 19:49:40 +08:00
玉澜
f77232d7c1
feat(schema): add agent-friendly manual hints
2026-07-13 13:41:30 +08:00
玉澜
a6f309d011
fix(schema): lazily load embedded catalog
2026-07-13 11:05:08 +08:00
玉澜
753866867f
feat(schema): complete catalog contract and smoke gates
2026-07-11 11:21:44 +08:00
玉澜
561525a18b
feat(schema): generate stable agent command catalog
2026-07-11 10:28:10 +08:00
玉澜
ec59f7b042
feat(schema): implement dynamic schema on static-endpoint architecture
...
Restore dynamic dws schema on top of upstream static-endpoint runtime
(v1.0.52) without re-introducing service discovery:
- port schema runtime (runtime_schema/schema_catalog/schema_agent_metadata/
schema_hints) + embedded agent & interface metadata + ir data structures
- ir/catalog.go: drop discovery-dependent BuildCatalog, keep runtime types
- canonical.go NewSchemaCommand: build schema from the live Cobra tree via
runtimeSchemaPayload instead of the stub
- add schema_support.go and design doc docs/schema-dynamic-endpoint-design.md
go build ./... passes; go test ./... 44 packages pass (only unrelated
post-goreleaser packaging tests fail with a known tar format issue).
2026-07-11 01:26:22 +08:00