玉澜
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
玉澜
235cad4cc7
fix: report honest MCP snapshot coverage
...
snapshot_services now counts only services whose tools/list succeeded and
missing_services names the failures, so a partially failed refresh can no
longer write a snapshot that claims full coverage.
2026-07-28 16:48:42 +08:00
玉澜
0d866911e0
fix: refresh existing MCP metadata
2026-07-23 14:20:23 +08:00
玉澜
2bf5401f55
fix: load split registry for MCP metadata refresh
2026-07-23 14:16:27 +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
修雨
4068847742
Merge remote-tracking branch 'origin/main' into codex/test-coverage-100-v2
2026-07-16 12:40:55 +08:00
修雨
7f07c22cd5
test: include coverage fixtures in native gates
2026-07-16 10:58:56 +08:00
修雨
ede677e413
fix(ci): align interface coverage and baseline
2026-07-16 10:26:19 +08:00
修雨
8f4ab176a8
ci: add code admission gate ( #53 )
...
* ci: add code admission gate
* ci: fix fork release baseline
(cherry picked from commit 7ff2f3a5f0435209908822e141a6355fc6fa4aa6)
2026-07-16 10:26:18 +08:00
修雨
8633246eff
test: expand unit coverage
2026-07-15 11:41:30 +08:00
tianlei.qjb
5f938d3675
init
2026-03-27 17:55:57 +08:00