Close quality and documentation workstream

This commit is contained in:
2026-09-05 18:16:15 +00:00
parent 204caf9d24
commit 0726786016
8 changed files with 19 additions and 20 deletions

View File

@@ -66,8 +66,10 @@ prepared reference resolution, receipt, bundle, and configured-lane policy.
The adapter validates the ordered selector/absolute-path pairs and is the sole
owner of serializing them as repeated `--reference` arguments before `--json`.
Object-store construction goes through `newCommandObjectStore`, which loads
configured filesystem secrets before adapter initialization.
Application-owned object-store construction loads configured filesystem
secrets before invoking the invocation's storage factory. Production commands
use the concrete storage adapter constructor; focused tests can supply an
in-memory backend without changing package state.
## Failure Semantics

View File

@@ -11,6 +11,11 @@ physical restore scope belong in
Restore separates remote authority, local conflict policy, and filesystem
mutation so each remains testable independently.
The public command supplies production defaults to one private,
invocation-scoped dependency value. Discovery, planning, and execution use that
same value, so focused sequencing tests can replace one boundary without
mutable package hooks.
## Discovery Contract
Discovery delegates current-state pointer and manifest loading to
@@ -118,4 +123,5 @@ Audio restore path:
- Tests: `internal/app/restore_discovery_test.go`,
`internal/app/restore_plan_test.go`,
`internal/app/restore_execution_test.go`,
`internal/app/restore_recovery_test.go`,
`internal/app/restore_workflow_test.go`

View File

@@ -52,6 +52,13 @@ Narratio-level contracts; external transport and SDK details remain in
adapters. The normative rules for these relationships remain in
[Architecture](../policy/architecture.md).
Command execution normalizes one private dependency value per invocation.
Configuration reads, secret-directory reads, remote downloads, object-store
construction, and restore phase functions use that value throughout the
command. Public command entry points supply production defaults, while focused
tests replace only the external or sequencing boundary they exercise without
mutating package state.
Pipeline execution and `session plan` share the same inclusive contiguous-range
model and the same pure pre-execution decision over recorded status, force, and
normalized resume validation. Planning applies that decision and modeled

View File

@@ -350,7 +350,7 @@ occurred.
## Stage 6 — Verify Coverage, Align Internal Documentation, And Close The Roadmap
**Status:** Pending
**Status:** Completed
### Goal

View File

@@ -463,7 +463,7 @@ cleanup-stage failure without republishing unchanged data.
### Workstream 10 — Quality, testability, and documentation alignment
**Status:** Pending (cross-cutting)
**Status:** Complete
**Audit sources:** H07, H08, H12, H13, H17, H18, H23, H25, C01, C02, C03,
C04, C05, and C06.

View File

@@ -34,10 +34,6 @@ func retainedCommandConfig(cfg *config.Config) *commandConfig {
return &commandConfig{Config: cfg}
}
func loadCommandConfig(ctx context.Context, pipelineFlag, campaignFlag, campaignFileFlag, sessionFlag string, sessionOpts config.SessionLoadOptions) (loaded *commandConfig, err error) {
return loadCommandConfigWithDependencies(ctx, pipelineFlag, campaignFlag, campaignFileFlag, sessionFlag, sessionOpts, commandDependencies{})
}
func loadCommandConfigWithDependencies(ctx context.Context, pipelineFlag, campaignFlag, campaignFileFlag, sessionFlag string, sessionOpts config.SessionLoadOptions, deps commandDependencies) (loaded *commandConfig, err error) {
deps = normalizeCommandDependencies(deps)
var cleanup func() error
@@ -139,10 +135,6 @@ func loadCommandConfigWithDependencies(ctx context.Context, pipelineFlag, campai
return loaded, nil
}
func loadPipelineCampaignConfig(pipelineFlag, campaignFlag, campaignFileFlag string, pipelineOpts config.PipelineLoadOptions) (*pipelineCampaignConfig, error) {
return loadPipelineCampaignConfigWithDependencies(pipelineFlag, campaignFlag, campaignFileFlag, pipelineOpts, commandDependencies{})
}
func loadPipelineCampaignConfigWithDependencies(pipelineFlag, campaignFlag, campaignFileFlag string, pipelineOpts config.PipelineLoadOptions, deps commandDependencies) (*pipelineCampaignConfig, error) {
deps = normalizeCommandDependencies(deps)
loadedPipelinePath, pipelineCfg, err := loadPipelineConfigWithDependencies(pipelineFlag, pipelineOpts, deps)

View File

@@ -9,10 +9,6 @@ import (
"gitea.maximumdirect.net/eric/narratio/internal/config"
)
func newCommandObjectStore(ctx context.Context, cfg *config.Config, logger *slog.Logger) (storage.ObjectStore, error) {
return newCommandObjectStoreWithDependencies(ctx, cfg, logger, commandDependencies{})
}
func newCommandObjectStoreWithDependencies(ctx context.Context, cfg *config.Config, logger *slog.Logger, deps commandDependencies) (storage.ObjectStore, error) {
deps = normalizeCommandDependencies(deps)
if _, err := loadSecretsFromConfigWithDependencies(cfg, logger, deps); err != nil {

View File

@@ -183,10 +183,6 @@ func inspectPreviousArtifactReadiness(
return out
}
func inspectRemoteCurrentState(ctx context.Context, cfg *config.Config, store storage.ObjectStore) remoteCurrentStateCheck {
return inspectRemoteCurrentStateWithDependencies(ctx, cfg, store, commandDependencies{})
}
func inspectRemoteCurrentStateWithDependencies(ctx context.Context, cfg *config.Config, store storage.ObjectStore, deps commandDependencies) remoteCurrentStateCheck {
if store == nil {
return remoteCurrentStateCheck{}