Repository navigation
test: add opt-in workspace verification and cross-module workflow - #2399
Conversation
Add same-checkout workspace suites, shared metadata checks, and cross-module contributor guidance without another full CI suite. Keep supplemental workspace checksums local. Co-authored-by: Mecatl <noreply@mecatl.dev>
Extract the runtime-directory fixture fix without identity/API changes and allow 30 minutes for complete Go test suites. Co-authored-by: Mecatl <noreply@mecatl.dev>
Approved implementation plan
This is the full approved plan, including its planning-time baseline and intended checks. Actual completed verification and limitations are reported in the PR description. Operator amendments retained here: reuse the current checkout, ignore root workspace sums while retaining module sums, extract only the socket test fixture, and allow 30 minutes for complete test suites. Machine-specific absolute checkout paths have been omitted; no functional requirements were removed. No merge, tag, release, or deployment authority is implied. Workspace testing and cross-module contributor workflowSlug: workspace-testing Goal and approved scopeProvide explicit opt-in commands to test every same-checkout Go module together before publishing coordinated module changes. Explain how to move from an assembled candidate to independently consumable modules without conflating the evidence. Operator decisions:
Do not introduce a CI skip label, workflow waiver, branch-protection bypass, or changed required-check policy. Acceptance of local workspace evidence does not by itself define how an intermediate breaking PR passes existing checks; that separate release-stack question remains open. Established behaviorThese files are unchanged between local main (42b933f) and the current identity checkpoint; revalidate against fresh main before implementation.
Proposed contractsOpt-in candidate testsAdd public tasks test:workspace and test:workspace:race. Reuse test:_suite's module/tag inventory by passing an execution mode or equivalent small internal parameter; default existing callers to today's behavior. Avoid a duplicate hand-maintained module list. Workspace tasks must:
Keep existing test/test:race and named standalone command semantics. Scope the explicit workspace selection for the tagged proof to new workspace calls rather than changing the existing task's ambient behavior gratuitously. Checksum hygieneUntrack the repository-root go.work.sum and add a root-specific ignore entry; Go may retain/regenerate each checkout's local copy. Keep go.work and every module's go.mod/go.sum tracked. Remove go.work.sum from CI freshness requirements. This replaces the original plan's tracked-workspace-sum policy after discussion of incidental workspace checksum churn. Provide a cheap explicit metadata verification command (proposed task name: test:module-metadata) usable after workspace tests and existing CI commands. It checks tracked differences and newly untracked Go metadata: root/nested go.mod and go.sum plus root go.work, without sweeping scratch worktrees or dependencies. Explicitly exclude root go.work.sum, including any legacy tracked copy in transition. Reuse the existing CI metadata check where practical rather than maintaining divergent path policies. This command is a cleanliness check against the committed candidate, not a formatter or dependency resolver. Check both HEAD-to-index and index-to-working-tree differences, plus untracked metadata; a staged edit reversed only in the working tree must not pass. Cover staged edits, additions and deletions, including newly staged metadata that is no longer untracked. It does not edit, reset, stage or delete files. Failures identify changed paths and tell the contributor to review/commit legitimate metadata changes and rerun. Preexisting intentional uncommitted metadata is not silently accepted; document that final cleanliness verification is performed after the intended metadata has been committed. Normal workspace test tasks themselves may leave checksum changes for review and must not call the cleanliness check unconditionally. Add only cheap checks to existing CI jobs: reuse the helper after Build's current metadata preparation and check the Test job's own metadata after its existing successful suite. No new full suite or job. Preserve current classification/draft behavior and do not run metadata preparation automatically after a test, which would conceal its effects. Changes that need unrelated published versions remain failures, not bypasses. Document that local go.work.sum creation/updates are expected and not submitted. Regeneration may produce a smaller file but covers only the commands run, not all supported configurations. Public checksum-database verification under normal settings and tracked per-module sums remain; an untracked workspace sum does not share prior supplemental checksum expectations, particularly relevant for private modules outside the checksum database. Do not promise a universal workspace tidy command or all-platform saturation. Do not recommend deleting tracked module sums, disabling the workspace, or running go work sync reflexively. Never delete checksum files as a workaround for checksum mismatches. Discoverable contributor procedureCreate docs/module-development.md (contributor procedure, not a public product feature). Add a short action-oriented pointer to root AGENTS.md and a link in docs/READING.md. Link applicable module compatibility policies; avoid duplicating their versioning authority. Add scoped pointers only if needed for discovery, not a new rule framework. Use tech-writer when drafting substantive documentation, and run task docs. The procedure must include executable commands and explicit stages:
Include a compact command table distinguishing task build, test/test:race, workspace tasks, named standalone tasks, task tidy, metadata check and publication proof. Include the module dependency outline and why workspace-selected third-party versions can differ from standalone versions. Implementation tasks
Tasks 2 and 3 share execution contracts and should integrate before task 4 is finalized. Observable acceptance and tests
Verification and deliveryFocused real command/fixture tests first; task lint and task test once on the integrated main-based change, then task test:race. Per the operator's timeout increase, give complete Go test suites 1800 seconds (30 minutes) each and other full gates 600 seconds. Run test:workspace:race explicitly for the new path, task docs for Markdown, offline go run ./cmd/mecademo showing tool call, permission ask/approval and result. Check no unintended dependency/API/generated changes remain. If full gates time out/fail, investigate and report, never count cancellation as success. Use panel-review against the implementation branch's recorded start OID, not moving main or the identity checkpoint. Focus on task selection, shell/metadata handling, CI cost and documentation correctness. No product wire/API behavior change intended; no engine public API change. If later authorized to open a PR, preserve a publishable full copy of the approved plan in one verified PR conversation comment per plan-implement; no posting authority is implied now. Plan reviewFresh-context review found no blockers and one important correction: the metadata guard must cover staged as well as unstaged changes, including staged edits reversed only in the working tree. Folded into the checksum contract and required regressions. A focused checksum-policy recheck found no blocker; its request to clarify Test-job wiring is already explicit above: add a new cheap invocation after its existing suite, since it has no guard today. Its uncertainty about -mod=readonly and workspace checksum writes must be settled by real Go fixture tests, not by dropping manifest protections on speculation. Reviews did not execute tests or fetch fresh main; implementation must revalidate those facts. Open boundary for operator confirmationThe plan intentionally leaves the existing CI/merge requirements untouched. Some intermediate coordinated-release PRs may still fail because old consumers or unpublished dependency pins cannot compile. Local workspace attestation is accepted as workspace evidence, but does not automatically waive those checks. A later explicit release-stack policy is required if such a PR must merge before its existing checks can pass. This PR should ship independently without solving that policy. |
Share the module inventory across validation and full test suites. Document per-module commands and the expected CI dependency-publication gap and recovery milestones. Co-authored-by: Mecatl <noreply@mecatl.dev>
Summary
Add an opt-in way to verify coordinated Go-module changes against the same checkout before publishing dependencies, without paying for another full suite on every PR.
task test:workspaceandtask test:workspace:race, explicitly selecting the checkout's workspace and reusing the existing 12-module inventory plus the offline tagged proof.go.work.sum; retaingo.workand each module'sgo.mod/go.sum. Share non-mutating staged/unstaged/untracked metadata checks between local use and existing CI jobs.docs/module-development.md, linked fromAGENTS.mdanddocs/READING.md.Issue relationship
Relates to #2117. This is independently useful testing infrastructure, not the identity implementation or release stack.
Type of change
Test plan
Baseline checks
task linttask --concurrency 3 testtask --concurrency 3 test:race(passed with the updated 1800-second outer budget)go run ./cmd/mecademo(offline Read/result and Write ask/approval/result)task docs(186 documents; zero broken links/anchors)task --concurrency 3 test:workspace:racetask test:workspace-infrastructure(9 metadata fixtures and 3 workspace-dispatch/resolution tests)task test:module-metadatamicrovm_devSite build and engine API regeneration are not applicable: no public user-docs content, guarded API, production behavior, module pins, or wire contracts changed.
task lint:actionspassed actionlint, action templates, and the new infrastructure fixtures, then stopped in the existing release fixture because localcosignis missing. This limitation is not a passing fulllint:actionsreceipt.API compatibility
No remote-observable behavior, public Go API, stored-data format, or dependency-version changes. No wire major or feature identifiers change; no client upgrade is required. The socket-path adjustment is test-fixture-only.
User-facing change
Contributor-only commands and guidance. Root workspace checksum churn no longer needs to be submitted. Per-module dependency metadata remains versioned and checked.
Special notes for reviewers
Implementation plan
Full approved implementation plan, including accepted amendments and the deferred intermediate-release check policy.