Align operator guidance with configured secrets startup
This commit is contained in:
@@ -14,6 +14,8 @@ Agents must read [Agent Policy](policy/agents.md) before recommending, planning,
|
||||
or implementing changes. It owns implementation discipline and the default
|
||||
commit-after-completed-work rule; it does not authorize pushing or releasing.
|
||||
|
||||
Narratio integrates [ConfigKit v1.4.0](https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/consumers/README.md) and [CommandKit v0.8.0](https://forge.maximumdirect.net/base-layer/commandkit/src/commit/0b53a63648c536afe50c46f948159116f776adae/docs/consumers/guide.md); their guides own upstream APIs and behavior.
|
||||
|
||||
## Go Prerequisite
|
||||
|
||||
The Go consumer minimum is 1.27.0, declared in `go.mod`. Maintained development
|
||||
|
||||
@@ -33,8 +33,8 @@ acquired context. Exact sources and effective-identity assertions are
|
||||
complementary. App acquisition needs no campaign or party for expansion;
|
||||
campaign acquisition needs no session. Session acquisition loads campaign
|
||||
context when required for defaults. Explicit party acquisition does not require
|
||||
a session. Credential bootstrap runs once per reached invocation after static
|
||||
input checks.
|
||||
a session. Each reached pipeline acquisition prepares its native source and applies
|
||||
configured bootstrap after static input checks; completed acquisitions are reused.
|
||||
|
||||
`LoadedPipelineCampaign` retains one selected pipeline/campaign while local or
|
||||
remote session resolution proceeds. Only absence permits remote fallback;
|
||||
@@ -54,8 +54,8 @@ synthetic source reconciliation, or generated family catalog in app inspection.
|
||||
Comparison sides load independently using each side's normal defaults and
|
||||
selectors. App-only overrides pass through native selection into ConfigKit;
|
||||
they remain invocation-local. Field overrides are unavailable to domain
|
||||
execution/planning and other scopes. Shared bootstrap does not imply shared
|
||||
overridden results. Public inspection and error paths preserve typed-secret
|
||||
execution/planning and other scopes. Comparison sides acquire separately and share the process environment while
|
||||
retaining separate completed results. Public inspection and error paths preserve typed-secret
|
||||
redaction and credential reference metadata. Load failures retain native errors
|
||||
and source evidence; domain commands use `ckconfig.AdaptDiagnostics` for their
|
||||
presentation without rewriting diagnostic records.
|
||||
@@ -96,3 +96,7 @@ labels alone do not invalidate work.
|
||||
Focused configuration/application fixtures cover imports, defaults, selected
|
||||
rosters, independent comparisons, override isolation, secret-safe persistence,
|
||||
and unchanged completed configuration across domain derivation and execution.
|
||||
|
||||
ConfigKit's [consumer guide](https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/consumers/README.md)
|
||||
and [CommandKit consumer guide](https://forge.maximumdirect.net/base-layer/commandkit/src/commit/0b53a63648c536afe50c46f948159116f776adae/docs/consumers/guide.md)
|
||||
own the upstream APIs and feature behavior.
|
||||
|
||||
@@ -8,6 +8,9 @@ in the [CLI](../cli.md), [Configuration](../config.md),
|
||||
Externally observable tool and format contracts belong under
|
||||
[Integrations](../integrations/).
|
||||
|
||||
Configuration and CLI integration use [ConfigKit v1.4.0](https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/consumers/README.md) and [CommandKit v0.8.0](https://forge.maximumdirect.net/base-layer/commandkit/src/commit/0b53a63648c536afe50c46f948159116f776adae/docs/consumers/guide.md); the upstream guides
|
||||
own their APIs.
|
||||
|
||||
## Execution Path
|
||||
|
||||
```text
|
||||
|
||||
@@ -809,14 +809,12 @@ Provision a credential directory as `0700` and credential files as `0600`;
|
||||
these permission modes are an operator requirement and are not enforced by
|
||||
ConfigKit.
|
||||
|
||||
Every pipeline-loading command bootstraps credentials once, before the first
|
||||
configuration load and before any adapter is constructed. `--secrets-dir`
|
||||
selects an explicit directory (relative paths use caller CWD). Otherwise a
|
||||
present `/usr/local/etc/narratio/secrets` directory is used, while an absent
|
||||
conventional directory is skipped. Explicit missing/empty selections and
|
||||
invalid existing directories fail the command. ConfigKit follows a symlink used
|
||||
as the selected directory, but immediate entries must be regular non-symlink
|
||||
files. Existing environment variables—including empty values—always win.
|
||||
Pipeline acquisition uses the directory declared in the main pipeline file,
|
||||
when present, before resolving typed credentials. Remove `--secrets-dir` from
|
||||
old invocations and declare `config.secrets_dir`, or provision environment values.
|
||||
A pipeline beside the former system-wide directory can select `secrets`; other
|
||||
layouts follow [ConfigKit's path rules](https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/config.md#explicit-secrets-directory-bootstrap).
|
||||
See [Secrets Handling](config.md#secrets-handling) for Narratio's integration.
|
||||
|
||||
S3 `access_key_id` and `secret_access_key` are an optional pair of typed
|
||||
environment references. When both are absent, the AWS SDK retains its default
|
||||
@@ -887,8 +885,8 @@ normal migration path.
|
||||
- Publish requires prerequisite stages through `render` and `analyze` to be succeeded.
|
||||
- Markdown publish defaults require render outputs (`transcripts/final.md` and `transcripts/final.trimmed.md`).
|
||||
- Restore requires configured object storage and committed remote current state.
|
||||
- Pipeline-loading commands bootstrap filesystem secrets once before configuration
|
||||
resolution and object-store initialization.
|
||||
- Each reached pipeline acquisition applies its configured startup before typed
|
||||
credential resolution and object-store initialization.
|
||||
|
||||
Console progress and informational diagnostics use native invocation visibility.
|
||||
`--progress` shows work without requiring verbose mode; `--verbose` adds source
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
**Base Policy Version:** 1.3
|
||||
|
||||
**Last Updated**: 2026-11-19
|
||||
**Last Updated**: 2026-11-22
|
||||
|
||||
**Upstream Source**: https://gitea.maximumdirect.net/eric/policy/src/commit/593c9b52273c5c879785ae9e995d21026df467b4/docs/policy/architecture.md
|
||||
|
||||
@@ -290,12 +290,12 @@ uses a separate restrictive contract.
|
||||
|
||||
Raw secrets must not be stored in pipeline, campaign, or session YAML or written
|
||||
to manifests, logs, generated configuration, reports, publish metadata,
|
||||
documentation, or examples. Pipeline configuration names environment variables;
|
||||
command-owned startup may populate previously unset variables from ConfigKit's
|
||||
explicit or conventional secrets directory. This bootstrap occurs once per
|
||||
invocation before any typed configuration load or adapter construction and is
|
||||
not hidden inside library loaders. Safe bootstrap diagnostics may identify
|
||||
files and statuses but never values. Diagnostics should avoid transcript and
|
||||
documentation, or examples. Pipeline configuration names environment variables. Command-owned pipeline
|
||||
acquisition explicitly prepares the selected source through ConfigKit's
|
||||
configured bootstrap before typed credential resolution and adapter construction.
|
||||
Completed acquisitions are reused normally; ConfigKit's selected environment
|
||||
policy governs each preparation. Library loading does not write the environment.
|
||||
Safe bootstrap diagnostics may identify files and statuses but never values. Diagnostics should avoid transcript and
|
||||
prompt content unless a deliberate, bounded inspection mechanism requires it.
|
||||
|
||||
Logs, reports, generated invocation files, generated configuration, and render
|
||||
|
||||
@@ -351,6 +351,12 @@ belongs in Narratio as part of this cleanup.
|
||||
|
||||
## Stage 9 — Align policy, operator guidance, internals, and examples
|
||||
|
||||
**Completed.** Updated architecture startup policy and operator, troubleshooting,
|
||||
internal, and example guidance for configured bootstrap and migration. Added
|
||||
version-pinned upstream links and a commented main-file example while preserving
|
||||
credential protection and historical decisions. Documentation and maintained
|
||||
example checks pass with Go 1.27.4.
|
||||
|
||||
Read `docs/policy/architecture.md`, `docs/operations.md`,
|
||||
`docs/troubleshooting.md`, `docs/internal/configuration.md`,
|
||||
`docs/internal/overview.md`, `docs/development.md`, `examples/README.md`, and
|
||||
|
||||
@@ -324,15 +324,15 @@ Likely causes:
|
||||
|
||||
- the named environment variable is absent or empty;
|
||||
- the selected secrets directory lacks a file with that exact name;
|
||||
- a process environment variable exists but is empty, so bootstrap correctly
|
||||
leaves it in place; or
|
||||
- a process environment variable is empty and the selected bootstrap policy
|
||||
preserves it; or
|
||||
- the Narratio reference name does not match `api_key_env` in the selected
|
||||
Notarius/PromptKit profile.
|
||||
|
||||
Safe fix:
|
||||
|
||||
- set the exact nonempty environment variable or provide an equivalently named
|
||||
file through the conventional or explicit secrets directory;
|
||||
file through the pipeline-configured secrets directory;
|
||||
- remove, set to `null`, or set to `[]` when that deployment needs no credential;
|
||||
and
|
||||
- use `config show`, `config sources`, and `config diff` to inspect the public
|
||||
@@ -359,7 +359,7 @@ Likely causes:
|
||||
- the Narratio pipeline still uses v1 endpoint, model, capacity, singular key,
|
||||
report, or retention settings;
|
||||
- the named key is missing or empty, including a present but empty process
|
||||
environment variable that takes precedence over a secrets-directory file;
|
||||
environment variable preserved by the selected bootstrap policy;
|
||||
- Audita's external v2 file references a backend credential name not forwarded
|
||||
by `pipeline.audita.credentials`, including a backend not selected by the
|
||||
current profile; or
|
||||
@@ -962,8 +962,8 @@ Symptom:
|
||||
|
||||
Likely causes:
|
||||
|
||||
- missing, unreadable, or invalid explicit `--secrets-dir`;
|
||||
- invalid entries in `/usr/local/etc/narratio/secrets`;
|
||||
- a missing, unreadable, or invalid pipeline-configured secrets directory;
|
||||
- invalid secret-directory entries;
|
||||
- missing credential environment variables;
|
||||
- invalid S3 endpoint/bucket settings.
|
||||
|
||||
@@ -976,7 +976,7 @@ env | sed 's/=.*//' | grep -E 'OBJECT_STORAGE|AWS|AUDITA|NOTARIUS|SCRIPTORIUM'
|
||||
|
||||
Safe fix:
|
||||
|
||||
- correct `--secrets-dir`, secret-file type/name, and operator-managed permissions;
|
||||
- correct the main pipeline secrets selection, file type/name, and operator-managed permissions;
|
||||
- provide required env vars;
|
||||
- keep secret values out of YAML.
|
||||
|
||||
|
||||
@@ -39,9 +39,7 @@ in the [configuration reference](../docs/config.md).
|
||||
needs no tools or cloud services. Native app inspection retains family
|
||||
declarations; `artifacts list` derives their concrete members using the selected
|
||||
campaign. Diff selects the example root on both sides because omitted
|
||||
right-side selectors use their own discovery defaults. To isolate the
|
||||
walkthrough from installed credential files, add `--secrets-dir` pointing to
|
||||
an existing empty directory to each command.
|
||||
right-side selectors use their own discovery defaults.
|
||||
- [Full annotated pipeline](pipeline.full.annotated.yml): every implemented
|
||||
pipeline section with explanatory comments.
|
||||
- [Extraction subset pipeline](pipeline.extraction-subset.yml): a focused
|
||||
@@ -89,8 +87,8 @@ names, or the Narratio credential lists must be changed to match. See the
|
||||
[Audita v2 migration guide](https://gitea.maximumdirect.net/eric/audita/src/tag/v2.0.0/docs/migrations/v2.md)
|
||||
for maintained downstream configuration examples.
|
||||
|
||||
For a deployed bundle, keep credential files out of source control in the
|
||||
conventional `/usr/local/etc/narratio/secrets` directory, one file per referenced
|
||||
environment-variable name, or select another directory with `--secrets-dir`.
|
||||
For a deployed bundle, keep credential files out of source control. Select a
|
||||
directory in the main pipeline or provide environment values; see
|
||||
[Secrets Handling](../docs/config.md#secrets-handling).
|
||||
Static S3 credentials are optional: omit both S3 credential references to use
|
||||
the AWS SDK discovery chain.
|
||||
|
||||
@@ -7,8 +7,10 @@ workspace:
|
||||
# Optional: remove run-scoped workdir after successful publish commit.
|
||||
cleanup_after_publish: false
|
||||
|
||||
# Credential files, when used, belong in a sibling secrets/ directory or in the
|
||||
# directory selected with --secrets-dir; they are not pipeline configuration.
|
||||
# Optional configured bootstrap; see the ConfigKit configured-startup contract:
|
||||
# https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/config.md#explicit-secrets-directory-bootstrap
|
||||
# config:
|
||||
# secrets_dir: secrets
|
||||
|
||||
storage:
|
||||
# Defaults to "local". Use "s3" explicitly for publish + S3 audio workflows.
|
||||
|
||||
Reference in New Issue
Block a user