Compare commits
20 Commits
7f90c70c30
...
d53a64650b
| Author | SHA1 | Date | |
|---|---|---|---|
| d53a64650b | |||
| e349bf03ca | |||
| 23c4686b84 | |||
| 4c114b6319 | |||
| 3de5f9378d | |||
| ee9a786677 | |||
| debef98536 | |||
| e08f083ec8 | |||
| 9bbec2fe79 | |||
| 77201baddf | |||
| ce91f04974 | |||
| 65502ce5b4 | |||
| 3695303100 | |||
| 95e865495c | |||
| 6547a8abd3 | |||
| b24c9a8fdf | |||
| a5a252ab30 | |||
| 2237a902b6 | |||
| f060d7eb1f | |||
| 2e92f2f200 |
@@ -25,16 +25,9 @@ steps:
|
||||
commands:
|
||||
- go build ./...
|
||||
|
||||
documentation-and-examples:
|
||||
image: golang:1.26
|
||||
depends_on: tests
|
||||
commands:
|
||||
- go test ./internal/doccheck
|
||||
- go test ./internal/config -run '^TestExamplesLoadAndValidate$'
|
||||
|
||||
cross-build:
|
||||
image: golang:1.26
|
||||
depends_on: [race-tests, static-analysis, build, documentation-and-examples]
|
||||
depends_on: [race-tests, static-analysis, build]
|
||||
commands:
|
||||
- |
|
||||
set -eu
|
||||
|
||||
33
AGENTS.md
33
AGENTS.md
@@ -1,5 +1,30 @@
|
||||
Please review `docs/development.md` for initial orientation in this repository
|
||||
and follow its task-specific reading guide.
|
||||
Start with `docs/development.md` for orientation and use its policy reading guide
|
||||
to select the policies applicable to the task. Do not read the entire suite by
|
||||
default.
|
||||
|
||||
Review and follow `docs/policy/agents.md` before recommending, planning, or
|
||||
implementing any changes to this repository.
|
||||
Read and follow `docs/policy/agents.md` before recommending, planning, or
|
||||
implementing repository changes.
|
||||
|
||||
<!-- codebase-memory-mcp:start -->
|
||||
# Codebase Knowledge Graph (codebase-memory-mcp)
|
||||
|
||||
This project uses codebase-memory-mcp to maintain a knowledge graph of the codebase.
|
||||
ALWAYS prefer MCP graph tools over grep/glob/file-search for code discovery.
|
||||
|
||||
## Priority Order
|
||||
1. `search_graph` — find functions, classes, routes, variables by pattern
|
||||
2. `trace_path` — trace who calls a function or what it calls
|
||||
3. `get_code_snippet` — read specific function/class source code
|
||||
4. `query_graph` — run Cypher queries for complex patterns
|
||||
5. `get_architecture` — high-level project summary
|
||||
|
||||
## When to fall back to grep/glob
|
||||
- Searching for string literals, error messages, config values
|
||||
- Searching non-code files (Dockerfiles, shell scripts, configs)
|
||||
- When MCP tools return insufficient results
|
||||
|
||||
## Examples
|
||||
- Find a handler: `search_graph(name_pattern=".*OrderHandler.*")`
|
||||
- Who calls it: `trace_path(function_name="OrderHandler", direction="inbound")`
|
||||
- Read source: `get_code_snippet(qualified_name="pkg/orders.OrderHandler")`
|
||||
<!-- codebase-memory-mcp:end -->
|
||||
|
||||
10
COPYRIGHT
10
COPYRIGHT
@@ -5,7 +5,7 @@ Copyright (C) 2026 Eric Rakestraw
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Narratio is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
@@ -14,6 +14,10 @@ The GNU General Public License version 3 is provided in LICENSE.
|
||||
Narratio is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
GNU General Public License for more details.
|
||||
|
||||
Third-party code and assets are subject to their respective license terms.
|
||||
Third-party code and assets are subject to their respective license terms.
|
||||
|
||||
Policy documents adapted from Standard Repository Policies remain licensed
|
||||
under CC-BY-SA-4.0. See docs/oss/attribution.md for the affected material,
|
||||
upstream credit, and license links.
|
||||
|
||||
@@ -40,3 +40,7 @@ This requires resolvable `pipeline.yml`, `campaign.yml`, and concrete
|
||||
and maintenance rules.
|
||||
- [Testing policy](docs/policy/testing.md) — test value, boundaries, and
|
||||
sufficiency.
|
||||
|
||||
Narratio is licensed under the [GPL v3.0 or later](COPYRIGHT).
|
||||
|
||||
[Open Source attribution notices](docs/oss/attribution.md) are available.
|
||||
|
||||
@@ -358,7 +358,7 @@ Rules:
|
||||
| `pipeline.notarius.enabled` | bool | No | `false` |
|
||||
| `pipeline.notarius.binary` | string | No | `notarius` |
|
||||
| `pipeline.notarius.credentials[]` | list[secret reference] | No | empty; exact environment-variable names forwarded to Notarius |
|
||||
| `pipeline.notarius.config_profile` | string | No | unset; exact Notarius ConfigKit profile selector |
|
||||
| `pipeline.notarius.config_overlay` | string | No | unset; exact Notarius ConfigKit overlay selector |
|
||||
| `pipeline.notarius.config_path` | string | Conditional | required when enabled; relative paths resolve from the pipeline file directory |
|
||||
| `pipeline.notarius.pipeline_id` | string | Conditional | required when enabled |
|
||||
| `pipeline.notarius.timeout` | duration | No | `3h`; must be positive |
|
||||
@@ -407,22 +407,33 @@ or `[]` forwards nothing. A Narratio overlay replaces the entire list, and
|
||||
`[]` clears it. See the [Audita integration contract](./integrations/audita.md)
|
||||
for the subprocess and redaction boundary.
|
||||
|
||||
### Notarius Configuration Profile
|
||||
<a id="notarius-configuration-profile"></a>
|
||||
|
||||
`pipeline.notarius.config_profile` optionally selects a Notarius ConfigKit
|
||||
configuration profile when extraction executes:
|
||||
### Notarius Configuration Overlay
|
||||
|
||||
Migration: rename `pipeline.notarius.config_profile` to `config_overlay`.
|
||||
The old field is rejected; there is no compatibility alias. For Notarius v0.8+
|
||||
move selected downstream files from `profiles/` to `overlays/` beside its root
|
||||
configuration. This does not rename PromptKit LLM profiles.
|
||||
The renamed selector also changes extraction resume evidence for named
|
||||
selections: their existing extraction is regenerated on the next applicable
|
||||
run, with normal dependent invalidation. Omitted/base selections do not acquire
|
||||
a new invalidation solely from this rename.
|
||||
|
||||
`pipeline.notarius.config_overlay` optionally selects a Notarius ConfigKit
|
||||
configuration overlay when extraction executes:
|
||||
|
||||
```yaml
|
||||
notarius:
|
||||
config_profile: downstream-economy
|
||||
config_overlay: downstream-economy
|
||||
```
|
||||
|
||||
When the field is omitted or `null`, Narratio supplies no downstream profile
|
||||
When the field is omitted or `null`, Narratio supplies no downstream overlay
|
||||
selector and preserves Notarius's existing configuration-selection behavior.
|
||||
When present, Narratio forwards the exact string to Notarius, including an
|
||||
empty string or `default`, which explicitly select Notarius's composed base
|
||||
configuration. Notarius owns selector interpretation and validation; Narratio
|
||||
does not restrict profile names, resolve profile files, or rewrite the value.
|
||||
does not restrict overlay names, resolve overlay files, or rewrite the value.
|
||||
|
||||
This selection is independent of Narratio's own `--overlay` selection. A
|
||||
Narratio overlay may explicitly select a differently named Notarius overlay,
|
||||
|
||||
@@ -19,6 +19,28 @@ commit-after-completed-work rule; it does not authorize pushing or releasing.
|
||||
Maintained development and verification require Go 1.26. Use the official Go
|
||||
1.26 toolchain before running repository commands.
|
||||
|
||||
## Policy Reading Guide
|
||||
|
||||
| Policy | Read before… |
|
||||
| --- | --- |
|
||||
| [Policy set provenance](policy/meta.md) | Adopting policies, checking upstream revisions, or updating the adopted policy set. |
|
||||
| [Agents](policy/agents.md) | Recommending, planning, or implementing repository changes. |
|
||||
| [Architecture](policy/architecture.md) | Planning or changing application code or its structure. |
|
||||
| [Testing](policy/testing.md) | Selecting validation for code changes, or adding, changing, removing, or evaluating tests. |
|
||||
| [Documentation](policy/documentation.md) | Writing, revising, or reorganizing documentation. |
|
||||
| [OSS](policy/oss.md) | Adding or updating dependencies or incorporated third-party material, or changing licensing or attribution. |
|
||||
| [Release](policy/release.md) | Preparing or publishing a release, changing release procedures, or making versioning and compatibility decisions. |
|
||||
|
||||
- Read applicable policies before making decisions they govern; multiple policies
|
||||
may apply.
|
||||
- Select policies using the task triggers above. Follow cross-references to
|
||||
relevant sections when needed to resolve a concrete question.
|
||||
- Reuse policies already available in context; reread when changed or no longer
|
||||
available.
|
||||
- Expand reading when the task's scope expands.
|
||||
- When revising a policy itself, read that policy and any provisions elsewhere
|
||||
affected by the revision.
|
||||
|
||||
## What To Read
|
||||
|
||||
| When working on | Read | Why |
|
||||
@@ -34,7 +56,7 @@ Maintained development and verification require Go 1.26. Use the official Go
|
||||
| Adapters or external tool contracts | [Adapter Internals](internal/adapters.md) and [Integration Contracts](integrations/README.md) | The internal guide owns adapter composition and mechanics; integration documents own external formats and protocols. |
|
||||
| Manifests, artifacts, workspace paths, or publish behavior | [Manifest Internals](internal/manifest.md), [Artifact Internals](internal/artifacts.md), [Workspace Internals](internal/workspace.md), [Publish Internals](internal/stage-publish.md), and [Operations](operations.md) | These separate implementation state and resolution from operator-visible layout and lifecycle. |
|
||||
| Maintained configuration or input examples | [Configuration](config.md) and [Examples](../examples/README.md) | The reference owns field meanings; the examples directory owns complete copyable files. |
|
||||
| Preparing, validating, or publishing a release | [Release Policy](policy/release.md) and [Release Procedure](release.md) | Policy owns requirements and exceptions; the procedure owns concrete validation, guarded publication, and optional later inspection. |
|
||||
| Preparing, validating, or publishing a release | [Release Policy](policy/release.md) and [Release Procedure](release.md) | Policy owns requirements; the procedure owns concrete validation, guarded publication, and optional later inspection. |
|
||||
| Proposed or unimplemented behavior | `docs/roadmap/` | Future work belongs only in roadmap documentation until implemented. |
|
||||
|
||||
For an existing subsystem, also inspect its focused tests and package-level
|
||||
@@ -42,23 +64,25 @@ contracts before changing behavior.
|
||||
|
||||
## Validation
|
||||
|
||||
Use focused package tests while iterating. Every pull request and push runs the
|
||||
following repository-wide checks before it can be accepted:
|
||||
Use focused package tests while iterating. Push and pull-request CI runs these
|
||||
repository-wide checks and cross-builds the declared targets:
|
||||
|
||||
```sh
|
||||
go test ./...
|
||||
go test -race ./...
|
||||
go vet ./...
|
||||
go build ./...
|
||||
go test ./internal/doccheck
|
||||
go test ./internal/config -run '^TestExamplesLoadAndValidate$'
|
||||
```
|
||||
|
||||
The documentation check verifies local Markdown links and the dependency graph
|
||||
of the Woodpecker workflows. The configuration check loads every maintained
|
||||
pipeline and session example. Tag CI reuses this validation path before its
|
||||
asynchronous asset publication; the maintainer release boundary is documented
|
||||
in the [Release Procedure](release.md).
|
||||
The full suite includes documentation-link and Woodpecker dependency checks
|
||||
and loads maintained pipeline and session examples. For focused diagnosis,
|
||||
run `go test ./internal/doccheck` or
|
||||
`go test ./internal/config -run '^TestExamplesLoadAndValidate$'` directly;
|
||||
these are available developer tools, not additional CI steps. Tag CI
|
||||
independently revalidates the tagged source before asynchronous asset delivery;
|
||||
it is not a second synchronous release prerequisite. The normal maintainer
|
||||
entry point is the single publication command in the
|
||||
[Release Procedure](release.md).
|
||||
|
||||
Woodpecker also runs `go test -race -shuffle=on -count=3 ./...` on its scheduled
|
||||
job to expose ordering and repeatability defects. Current runners cross-compile
|
||||
|
||||
@@ -7,14 +7,14 @@ lanes from the final trimmed Seriatim transcript. Narratio owns invocation,
|
||||
safe bundle discovery, lane selection, and its own artifact metadata. Notarius
|
||||
owns pipeline definitions, lane schemas, the receipt, and bundle formats.
|
||||
|
||||
Canonical Notarius v0.7.0 references:
|
||||
Canonical Notarius v0.8.1 references:
|
||||
|
||||
- [CLI reference](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.7.0/docs/cli.md)
|
||||
- [Subprocess consumer contract](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.7.0/docs/consumers/subprocess.md)
|
||||
- [D&D pipeline and lane contracts](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.7.0/docs/consumers/dnd-pipeline.md)
|
||||
- [Run-result receipt](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.7.0/docs/integrations/run-result.md)
|
||||
- [JSON output bundle](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.7.0/docs/integrations/json-output.md)
|
||||
- [D&D spell-catalog overlay](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.7.0/docs/integrations/dnd-spell-catalog-overlays.md)
|
||||
- [CLI reference](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.8.1/docs/cli.md)
|
||||
- [Subprocess consumer contract](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.8.1/docs/consumers/subprocess.md)
|
||||
- [D&D pipeline and lane contracts](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.8.1/docs/consumers/dnd-pipeline.md)
|
||||
- [Run-result receipt](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.8.1/docs/integrations/run-result.md)
|
||||
- [JSON output bundle](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.8.1/docs/integrations/json-output.md)
|
||||
- [D&D spell-catalog overlay](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.8.1/docs/integrations/dnd-spell-catalog-overlays.md)
|
||||
|
||||
The [complete Narratio example](../../examples/pipeline.full.annotated.yml)
|
||||
records the exact current constraints for all ten D&D lanes. Treat the linked
|
||||
@@ -27,17 +27,17 @@ When `pipeline.notarius.enabled` is true, Narratio resolves the executable,
|
||||
configuration path, input path, output directory, and working directory to
|
||||
absolute paths. Configured references require support for the `--reference`
|
||||
contract introduced in Notarius v0.6.0. Cache controls require support for the
|
||||
selected `--resume` and `--chunk_cache` flags. Notarius v0.7.0 is the tested
|
||||
selected `--resume` and `--chunk_cache` flags. Notarius v0.8.1 is the tested
|
||||
cache integration baseline, not an unconditional minimum version; Narratio
|
||||
does not impose a runtime version gate. Each reference binding is a separate
|
||||
argument before `--json`. When `pipeline.notarius.config_profile` is present,
|
||||
argument before `--json`. When `pipeline.notarius.config_overlay` is present,
|
||||
its exact value is another argument pair before `--json`:
|
||||
|
||||
```text
|
||||
notarius run <pipeline_id> --config <config_path> --input <trimmed_json> --output-dir <staging_dir> [--resume] [--chunk_cache <mode>] [--reference <selector>=<verified_snapshot_path>]... [--config-profile <name>] --json
|
||||
notarius run <pipeline_id> --config <config_path> --input <trimmed_json> --output-dir <staging_dir> [--resume] [--chunk_cache <mode>] [--reference <selector>=<verified_snapshot_path>]... [--config-overlay <name>] --json
|
||||
```
|
||||
|
||||
Notarius v0.7.0 is a known supporting version for `--config-profile`; using the
|
||||
Notarius v0.8.1 is a known supporting version for `--config-overlay`; using the
|
||||
option requires a compatible Notarius executable, but deployments that omit the
|
||||
field acquire no additional version requirement. Omitted or null configuration
|
||||
adds no flag. Supplied empty, `default`, and named selectors are forwarded
|
||||
@@ -46,7 +46,7 @@ option selects a Notarius configuration overlay, not a PromptKit profile through
|
||||
`--llm-profile`, and Narratio never substitutes its own selected overlay name.
|
||||
A missing or invalid downstream overlay is an ordinary Notarius subprocess
|
||||
failure: Narratio does not retry without the selector or fall back to another
|
||||
profile.
|
||||
overlay.
|
||||
|
||||
Reference paths are absolute stable snapshots streamed from manifest-verified
|
||||
canonical files prepared inside the current Narratio session workspace. They
|
||||
@@ -129,7 +129,7 @@ encoded credentials.
|
||||
|
||||
## Accepted Result
|
||||
|
||||
Narratio's tested invocation baseline is Notarius v0.7.0. The accepted
|
||||
Narratio's tested invocation baseline is Notarius v0.8.1. The accepted
|
||||
receipt remains `notarius.run-result.v2`; reference flags do not change the
|
||||
receipt or ten-lane output contract. The receipt
|
||||
must identify the configured pipeline, and its `index_file` must be exactly
|
||||
@@ -188,7 +188,7 @@ for failure recovery.
|
||||
## Opt-in Integration Test
|
||||
|
||||
The production-boundary cache test requires an absolute path to a locally
|
||||
built Notarius v0.7.0-compatible executable. It uses only a local
|
||||
built Notarius v0.8.1-compatible executable. It uses only a local
|
||||
OpenAI-compatible `httptest` provider and temporary cache/config/output roots:
|
||||
|
||||
```sh
|
||||
|
||||
@@ -24,11 +24,11 @@ procedures belong in [Operations](../operations.md).
|
||||
and rejects any source change observed while copying;
|
||||
4. fingerprints the byte- and provenance-bearing Notarius invocation evidence,
|
||||
including sorted reference identities and the explicit downstream
|
||||
configuration-profile selection;
|
||||
configuration-overlay selection;
|
||||
5. creates a run-local staging directory and invokes the injected
|
||||
`notarius.Runner`, carrying the optional already-resolved credential
|
||||
reference without exposing its value, the optional exact configuration
|
||||
profile, plus effective resume and chunk-cache controls after force
|
||||
overlay, plus effective resume and chunk-cache controls after force
|
||||
precedence;
|
||||
6. revalidates the reference snapshots, then validates the v2 successful
|
||||
receipt, confined index, management documents, configured required lane
|
||||
@@ -73,7 +73,7 @@ Before the focused validator runs, the application compares extract's versioned
|
||||
semantic fingerprint. It covers enablement, Notarius pipeline identity, sorted
|
||||
reference selector/source mappings, sorted declared output contracts, and each
|
||||
canonical `narratio.extraction.<key>` output identity. It also covers the
|
||||
explicit Notarius configuration-profile selection; omitted, empty, and exact
|
||||
explicit Notarius configuration-overlay selection; omitted, empty, and exact
|
||||
`default` selectors share the base-selection identity. It excludes executable,
|
||||
timeout, working directory, config path, and private Notarius config contents.
|
||||
Credential presence, reference name, and resolved value are likewise
|
||||
@@ -85,7 +85,7 @@ not rerun a valid completed extraction or stale its dependents.
|
||||
stage record still matches the current byte- and provenance-bearing invocation
|
||||
evidence. That evidence covers the current direct trimmed-transcript identity,
|
||||
sorted prepared-reference identities, pipeline identity, and configured output
|
||||
contracts, plus the same downstream profile-selection identity. The same
|
||||
contracts, plus the same downstream overlay-selection identity. The same
|
||||
reference helper and transcript identity are resolved again for artifact
|
||||
evidence, so changing current transcript bytes, reference bytes, producer
|
||||
identity, or a named downstream selection makes the prior extraction obsolete.
|
||||
@@ -107,7 +107,7 @@ obsolete results are non-resumable and run again; unsafe filesystem conditions
|
||||
return an error rather than silently accepting or replacing data.
|
||||
|
||||
This sensitivity is limited to the explicit downstream selector. Narratio's
|
||||
own profile label and whole effective-configuration digest are not blanket
|
||||
own overlay label and whole effective-configuration digest are not blanket
|
||||
extraction invalidators. Neither contract can observe files imported by
|
||||
Notarius configuration, profile contents, prompt/module definitions, or other
|
||||
transitive inputs. Operators must force extraction after changing any such
|
||||
@@ -144,5 +144,5 @@ recovery.
|
||||
`internal/artifacts/extraction_catalog_test.go`
|
||||
- Composition and downstream behavior: `internal/app/runner_test.go`,
|
||||
`internal/stage/analyze_test.go`, `internal/stage/publish_test.go`
|
||||
- Opt-in Notarius v0.7.0 production-boundary coverage:
|
||||
- Opt-in Notarius v0.8.1 production-boundary coverage:
|
||||
`internal/stage/notarius_cache_integration_test.go`
|
||||
|
||||
@@ -282,16 +282,68 @@ earlier checkpoints are reused and execution resumes with failed, stale, or
|
||||
missing work in dependency order. `--force` is unnecessary unless the operator
|
||||
intends to replace otherwise-current artifacts.
|
||||
|
||||
### Developing With A Notarius Configuration Profile
|
||||
### Developing With Audita And Notarius Overlays
|
||||
|
||||
A Narratio development overlay can explicitly select a Notarius overlay without
|
||||
requiring the names to match. For example, `overlays/testing.yml` may contain:
|
||||
All three applications use ConfigKit, but each owns its root configuration and
|
||||
its own `overlays/` directory beside that file. A Narratio testing overlay can
|
||||
explicitly select downstream testing overlays without requiring their names to
|
||||
match. For example, Narratio's `overlays/testing.yml` may contain:
|
||||
|
||||
```yaml
|
||||
audita:
|
||||
overlay: testing
|
||||
notarius:
|
||||
config_profile: downstream-economy
|
||||
config_overlay: downstream-economy
|
||||
```
|
||||
|
||||
Place Audita's settings in `overlays/testing.yml` beside its configuration, and
|
||||
Notarius's settings in `overlays/downstream-economy.yml` beside its configuration.
|
||||
Use each tool's own schema for model/profile selection and other settings;
|
||||
Narratio neither copies those settings nor implicitly forwards its overlay name.
|
||||
Select the Narratio file with `--overlay testing` on the desired command. Each
|
||||
downstream selector is used only when its stage actually executes: `polish` for
|
||||
Audita and `extract` for Notarius. Production can omit both selectors.
|
||||
|
||||
For Audita debug inspection, its testing overlay can include:
|
||||
|
||||
```yaml
|
||||
diagnostics:
|
||||
debug: true
|
||||
work_dir: /path/to/audita-debug
|
||||
```
|
||||
|
||||
Audita retains detailed artifacts under that directory. Inspect them there;
|
||||
Narratio does not collect or manage them. Ordinary Audita reports remain a
|
||||
separate existing integration. Leave debug disabled in Audita's production
|
||||
configuration unless deliberately needed.
|
||||
|
||||
Notarius's debug controls are different: `debug.directory` selects a location
|
||||
but does not enable capture. Capture requires its `--debug` flag, which Narratio
|
||||
does not currently forward. Selecting a Notarius testing overlay therefore does
|
||||
not by itself enable a debug bundle. See the upstream
|
||||
[Audita configuration](https://gitea.maximumdirect.net/eric/audita/src/tag/v2.0.1/docs/config.md)
|
||||
and [Notarius CLI](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.8.1/docs/cli.md)
|
||||
for their respective controls.
|
||||
|
||||
Edits inside downstream configuration behind an unchanged selector are not
|
||||
automatically detected by Narratio. To inspect a fresh Audita debug run, explicitly
|
||||
rerun polish, for example:
|
||||
|
||||
```sh
|
||||
narratio run SESSION --overlay testing --force --from polish --through polish
|
||||
```
|
||||
|
||||
This replaces polish output and invalidates dependent results; it is not a
|
||||
diagnostics-only operation. Selecting testing does not create an isolated
|
||||
workspace or retain a separate current result.
|
||||
|
||||
Notarius v0.8+ defaults to two additional eligible transient provider attempts
|
||||
per generation. Review downstream retry settings and Narratio's extraction
|
||||
timeout together; retries can increase elapsed time and provider charges.
|
||||
Notarius v0.8.1 refreshes its built-in profile checkpoint identity, so older
|
||||
checkpoints may not be reused. Source-keyed chunk plans and already published
|
||||
outputs are unaffected; no manual cache deletion is required.
|
||||
|
||||
Selecting Narratio's `testing` overlay then supplies `downstream-economy` only
|
||||
when extraction executes. Switching that explicit selector makes a recorded
|
||||
extraction non-current and reruns it when `extract` is in the selected stage
|
||||
@@ -302,9 +354,11 @@ Narratio cannot observe edits inside Notarius configuration behind an unchanged
|
||||
selector. Force extraction after such an edit when a replacement is intended.
|
||||
Use `regenerate-artifacts` when both extraction and analysis must be rebuilt;
|
||||
use `analyze` when the existing extraction bundle should be preserved. Field
|
||||
semantics belong in [Configuration](./config.md#notarius-configuration-profile),
|
||||
and the exact downstream invocation belongs in the
|
||||
[Notarius integration contract](./integrations/notarius.md#invocation).
|
||||
semantics belong in [Configuration](./config.md#notarius-configuration-overlay),
|
||||
with Audita selectors covered under
|
||||
[Audita selection and credentials](./config.md#audita-selection-and-credentials).
|
||||
Exact downstream invocations belong in the [Audita](./integrations/audita.md)
|
||||
and [Notarius](./integrations/notarius.md#invocation) integration contracts.
|
||||
|
||||
## Artifact Selection
|
||||
|
||||
|
||||
213
docs/oss/attribution.md
Normal file
213
docs/oss/attribution.md
Normal file
@@ -0,0 +1,213 @@
|
||||
# Open Source Attribution Notices
|
||||
|
||||
## Standard Repository Policies
|
||||
|
||||
Material: `docs/policy/agents.md`, `architecture.md`, `documentation.md`,
|
||||
`testing.md`, `release.md`, `meta.md`, and `oss.md`; root `AGENTS.md` and the policy reading
|
||||
guide in `docs/development.md`, adapted for this repository.
|
||||
|
||||
Copyright (C) 2026 Eric Rakestraw
|
||||
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
|
||||
License and notices: [CC BY-SA 4.0](licenses/CC-BY-SA-4.0.txt) |
|
||||
[COPYRIGHT](https://gitea.maximumdirect.net/eric/policy/src/commit/d84a38ebab26f048cafbe59a2246700c35d29843/COPYRIGHT) |
|
||||
[LICENSE](https://gitea.maximumdirect.net/eric/policy/src/commit/d84a38ebab26f048cafbe59a2246700c35d29843/LICENSE).
|
||||
|
||||
[Source](https://gitea.maximumdirect.net/eric/policy/src/commit/d84a38ebab26f048cafbe59a2246700c35d29843).
|
||||
|
||||
## ConfigKit
|
||||
|
||||
Selected module: `gitea.maximumdirect.net/eric/ConfigKit` at `v0.4.2`.
|
||||
|
||||
Copyright (C) 2026 Eric Rakestraw
|
||||
|
||||
SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
License and notices: [LGPL 3.0](licenses/LGPL-3.0.txt) |
|
||||
[GPL 3.0](licenses/GPL-3.0.txt) |
|
||||
[COPYRIGHT](https://gitea.maximumdirect.net/eric/ConfigKit/src/commit/67c03690181c5af8dde6be325abac241dae6732f/COPYRIGHT) |
|
||||
[LICENSE](https://gitea.maximumdirect.net/eric/ConfigKit/src/commit/67c03690181c5af8dde6be325abac241dae6732f/LICENSE).
|
||||
|
||||
[Source](https://gitea.maximumdirect.net/eric/ConfigKit/src/commit/67c03690181c5af8dde6be325abac241dae6732f).
|
||||
|
||||
## YAML v3
|
||||
|
||||
Selected module: `gopkg.in/yaml.v3` at `v3.0.1`.
|
||||
|
||||
Copyright (c) 2006-2010 Kirill Simonov
|
||||
|
||||
Copyright (c) 2006-2011 Kirill Simonov
|
||||
|
||||
Copyright (c) 2011-2019 Canonical Ltd
|
||||
|
||||
Copyright 2011-2016 Canonical Ltd.
|
||||
|
||||
SPDX-License-Identifier: MIT AND Apache-2.0
|
||||
|
||||
License and notices: [MIT](licenses/MIT.txt) |
|
||||
[Apache 2.0](licenses/Apache-2.0.txt) |
|
||||
[LICENSE](https://github.com/go-yaml/yaml/blob/f6f7691b1fdeb513f56608cd2c32c51f8194bf51/LICENSE) |
|
||||
[NOTICE](https://github.com/go-yaml/yaml/blob/f6f7691b1fdeb513f56608cd2c32c51f8194bf51/NOTICE).
|
||||
|
||||
[Source](https://github.com/go-yaml/yaml/commit/f6f7691b1fdeb513f56608cd2c32c51f8194bf51).
|
||||
|
||||
## YAML v4
|
||||
|
||||
Selected module: `go.yaml.in/yaml/v4` at `v4.0.0-rc.6`.
|
||||
|
||||
Copyright 2006-2010 Kirill Simonov
|
||||
|
||||
Copyright 2011-2019 Canonical Ltd
|
||||
|
||||
Copyright 2025 The go-yaml Project Contributors
|
||||
|
||||
SPDX-License-Identifier: MIT AND Apache-2.0
|
||||
|
||||
License and notices: [MIT](licenses/MIT.txt) |
|
||||
[Apache 2.0](licenses/Apache-2.0.txt) |
|
||||
[LICENSE](https://github.com/yaml/go-yaml/blob/1c17b9cee72bf81ae73a8be50fbd7dd3a9985125/LICENSE) |
|
||||
[NOTICE](https://github.com/yaml/go-yaml/blob/1c17b9cee72bf81ae73a8be50fbd7dd3a9985125/NOTICE).
|
||||
|
||||
[Source](https://github.com/yaml/go-yaml/commit/1c17b9cee72bf81ae73a8be50fbd7dd3a9985125).
|
||||
|
||||
## go-cmp
|
||||
|
||||
Selected module: `github.com/google/go-cmp` at `v0.7.0` (test-only).
|
||||
|
||||
Copyright (c) 2017 The Go Authors. All rights reserved.
|
||||
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
License and notices: [BSD 3-Clause](licenses/BSD-3-Clause.txt) |
|
||||
[LICENSE](https://github.com/google/go-cmp/blob/9b12f366a942ebc7254abc7f32ca05068b455fb7/LICENSE).
|
||||
|
||||
[Source](https://github.com/google/go-cmp/commit/9b12f366a942ebc7254abc7f32ca05068b455fb7).
|
||||
|
||||
## Go sync extension
|
||||
|
||||
Selected module: `golang.org/x/sync` at `v0.22.0`.
|
||||
|
||||
Copyright 2009 The Go Authors.
|
||||
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
License and notices: [BSD 3-Clause](licenses/BSD-3-Clause.txt) |
|
||||
[LICENSE](https://github.com/golang/sync/blob/1eb64d4bc0cde6da1bb8ebc7f178bb577508e5d0/LICENSE) |
|
||||
[PATENTS](https://github.com/golang/sync/blob/1eb64d4bc0cde6da1bb8ebc7f178bb577508e5d0/PATENTS).
|
||||
|
||||
[Source](https://github.com/golang/sync/commit/1eb64d4bc0cde6da1bb8ebc7f178bb577508e5d0).
|
||||
|
||||
## Go system extension
|
||||
|
||||
Selected module: `golang.org/x/sys` at `v0.47.0`.
|
||||
|
||||
Copyright 2009 The Go Authors.
|
||||
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
License and notices: [BSD 3-Clause](licenses/BSD-3-Clause.txt) |
|
||||
[LICENSE](https://github.com/golang/sys/blob/9e7e939dcafac07e8ab4cffa6e5fc74908413f00/LICENSE) |
|
||||
[PATENTS](https://github.com/golang/sys/blob/9e7e939dcafac07e8ab4cffa6e5fc74908413f00/PATENTS).
|
||||
|
||||
[Source](https://github.com/golang/sys/commit/9e7e939dcafac07e8ab4cffa6e5fc74908413f00).
|
||||
|
||||
## Go runtime and standard library
|
||||
|
||||
Material: Go `1.26.7` runtime and standard library material incorporated in
|
||||
release binaries built with the declared `golang:1.26.7` CI toolchain.
|
||||
|
||||
Copyright 2009 The Go Authors.
|
||||
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
License and notices: [BSD 3-Clause](licenses/BSD-3-Clause.txt) |
|
||||
[LICENSE](https://github.com/golang/go/blob/e3336a22ad3f0a90bd252c95d8b5544e02674205/LICENSE) |
|
||||
[PATENTS](https://github.com/golang/go/blob/e3336a22ad3f0a90bd252c95d8b5544e02674205/PATENTS).
|
||||
|
||||
[Source](https://github.com/golang/go/commit/e3336a22ad3f0a90bd252c95d8b5544e02674205).
|
||||
|
||||
## AWS SDK for Go v2
|
||||
|
||||
Selected modules under `github.com/aws/aws-sdk-go-v2` at source revision
|
||||
`2223642aeafb3b46ae924667ee47d31a1cf5a9d5`: root `v1.41.7`,
|
||||
`aws/protocol/eventstream` `v1.7.10`, `config` `v1.32.17`, `credentials`
|
||||
`v1.19.16`, `feature/ec2/imds` `v1.18.23`, `internal/configsources`
|
||||
`v1.4.23`, `internal/endpoints/v2` `v2.7.23`, `internal/v4a` `v1.4.24`,
|
||||
`service/internal/accept-encoding` `v1.13.9`, `service/internal/checksum`
|
||||
`v1.9.15`, `service/internal/presigned-url` `v1.13.23`,
|
||||
`service/internal/s3shared` `v1.19.23`, `service/signin` `v1.0.11`,
|
||||
`service/sso` `v1.30.17`, `service/ssooidc` `v1.35.21`, and `service/sts`
|
||||
`v1.42.1`.
|
||||
|
||||
Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Copyright 2014-2015 Stripe, Inc.
|
||||
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
License and notices: [Apache 2.0](licenses/Apache-2.0.txt) |
|
||||
[LICENSE.txt](https://github.com/aws/aws-sdk-go-v2/blob/2223642aeafb3b46ae924667ee47d31a1cf5a9d5/LICENSE.txt) |
|
||||
[NOTICE.txt](https://github.com/aws/aws-sdk-go-v2/blob/2223642aeafb3b46ae924667ee47d31a1cf5a9d5/NOTICE.txt).
|
||||
|
||||
[Source](https://github.com/aws/aws-sdk-go-v2/commit/2223642aeafb3b46ae924667ee47d31a1cf5a9d5).
|
||||
|
||||
## AWS SDK for Go v2 S3
|
||||
|
||||
Selected module: `github.com/aws/aws-sdk-go-v2/service/s3` at `v1.101.0`.
|
||||
|
||||
Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Copyright 2014-2015 Stripe, Inc.
|
||||
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
License and notices: [Apache 2.0](licenses/Apache-2.0.txt) |
|
||||
[LICENSE.txt](https://github.com/aws/aws-sdk-go-v2/blob/84ddd08980744ac0f3bacfe7d2796c861671accc/service/s3/LICENSE.txt) |
|
||||
[NOTICE.txt](https://github.com/aws/aws-sdk-go-v2/blob/84ddd08980744ac0f3bacfe7d2796c861671accc/NOTICE.txt).
|
||||
|
||||
[Source](https://github.com/aws/aws-sdk-go-v2/commit/84ddd08980744ac0f3bacfe7d2796c861671accc).
|
||||
|
||||
## AWS Smithy Go
|
||||
|
||||
Selected module: `github.com/aws/smithy-go` at `v1.25.1`.
|
||||
|
||||
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
License and notices: [Apache 2.0](licenses/Apache-2.0.txt) |
|
||||
[LICENSE](https://github.com/aws/smithy-go/blob/e094f45e716e33a1b950cf8bbe804790bf87f965/LICENSE) |
|
||||
[NOTICE](https://github.com/aws/smithy-go/blob/e094f45e716e33a1b950cf8bbe804790bf87f965/NOTICE).
|
||||
|
||||
[Source](https://github.com/aws/smithy-go/commit/e094f45e716e33a1b950cf8bbe804790bf87f965).
|
||||
|
||||
## Go singleflight in AWS SDK for Go v2
|
||||
|
||||
Material: `internal/sync/singleflight` in the selected AWS SDK root module.
|
||||
|
||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
||||
|
||||
Copyright 2013 The Go Authors. All rights reserved.
|
||||
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
License and notices: [BSD 3-Clause](licenses/BSD-3-Clause.txt) |
|
||||
[LICENSE](https://github.com/aws/aws-sdk-go-v2/blob/2223642aeafb3b46ae924667ee47d31a1cf5a9d5/internal/sync/singleflight/LICENSE).
|
||||
|
||||
[Source](https://github.com/aws/aws-sdk-go-v2/commit/2223642aeafb3b46ae924667ee47d31a1cf5a9d5).
|
||||
|
||||
## Go singleflight in AWS Smithy Go
|
||||
|
||||
Material: `internal/sync/singleflight` in the selected smithy-go module.
|
||||
|
||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
||||
|
||||
Copyright 2013 The Go Authors. All rights reserved.
|
||||
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
License and notices: [BSD 3-Clause](licenses/BSD-3-Clause.txt) |
|
||||
[LICENSE](https://github.com/aws/smithy-go/blob/e094f45e716e33a1b950cf8bbe804790bf87f965/internal/sync/singleflight/LICENSE).
|
||||
|
||||
[Source](https://github.com/aws/smithy-go/commit/e094f45e716e33a1b950cf8bbe804790bf87f965).
|
||||
202
docs/oss/licenses/Apache-2.0.txt
Normal file
202
docs/oss/licenses/Apache-2.0.txt
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
11
docs/oss/licenses/BSD-3-Clause.txt
Normal file
11
docs/oss/licenses/BSD-3-Clause.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Copyright (c) <year> <owner>.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
170
docs/oss/licenses/CC-BY-SA-4.0.txt
Normal file
170
docs/oss/licenses/CC-BY-SA-4.0.txt
Normal file
@@ -0,0 +1,170 @@
|
||||
Creative Commons Attribution-ShareAlike 4.0 International
|
||||
|
||||
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.
|
||||
|
||||
Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described.
|
||||
|
||||
Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.
|
||||
|
||||
Creative Commons Attribution-ShareAlike 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
||||
|
||||
Section 1 – Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
|
||||
|
||||
k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
|
||||
|
||||
l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
|
||||
|
||||
m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
|
||||
|
||||
Section 2 – Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
A. reproduce and Share the Licensed Material, in whole or in part; and
|
||||
|
||||
B. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section 6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
|
||||
|
||||
B. Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply.
|
||||
|
||||
C. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
|
||||
|
||||
Section 3 – License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified form), You must:
|
||||
|
||||
A. retain the following if it is supplied by the Licensor with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
||||
|
||||
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
|
||||
|
||||
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||||
|
||||
b. ShareAlike.In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
|
||||
|
||||
Section 4 – Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
|
||||
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
|
||||
|
||||
Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
|
||||
|
||||
b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
|
||||
|
||||
Section 6 – Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
||||
|
||||
d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
|
||||
|
||||
e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||
|
||||
Section 7 – Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
|
||||
|
||||
Section 8 – Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
|
||||
|
||||
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
674
docs/oss/licenses/GPL-3.0.txt
Normal file
674
docs/oss/licenses/GPL-3.0.txt
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
165
docs/oss/licenses/LGPL-3.0.txt
Normal file
165
docs/oss/licenses/LGPL-3.0.txt
Normal file
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
18
docs/oss/licenses/MIT.txt
Normal file
18
docs/oss/licenses/MIT.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
||||
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,12 +1,14 @@
|
||||
# Agent Policy
|
||||
|
||||
**Base Policy Version:** 1.1
|
||||
**Base Policy Version:** 1.3
|
||||
|
||||
**Last Updated**: 2026-09-25
|
||||
**Last Updated**: 2026-09-28
|
||||
|
||||
**Upstream Source**: https://gitea.maximumdirect.net/eric/policy/src/commit/d84a38ebab26f048cafbe59a2246700c35d29843/docs/policy/agents.md
|
||||
|
||||
## Purpose
|
||||
|
||||
Agents working in this repository must read and adhere to the following house rules.
|
||||
Agents must read and follow these rules.
|
||||
|
||||
## Implementation Discipline
|
||||
|
||||
@@ -14,8 +16,6 @@ Agents working in this repository must read and adhere to the following house ru
|
||||
request. Do not implicitly strengthen requirements, restrictions, or guarantees
|
||||
beyond what the user actually requested.
|
||||
|
||||
Simplify the mechanism, not the user's choices.
|
||||
|
||||
**Keep implementation machinery proportionate.** Use straightforward,
|
||||
idiomatic code and introduce only the machinery needed to support the requested
|
||||
behavior and flexibility. Optimize for conceptual simplicity and
|
||||
@@ -29,11 +29,6 @@ operator and caller choice where policy has not been established. If an
|
||||
additional restriction appears advisable, present it as a decision rather than
|
||||
silently implementing it.
|
||||
|
||||
A correctness constraint must follow from the requested behavior or an
|
||||
established invariant, not from the convenience of the chosen implementation.
|
||||
Explain the specific failure it prevents and why a less restrictive
|
||||
implementation cannot satisfy the contract.
|
||||
|
||||
**Do not invent guarantees.** Do not strengthen public contracts, guarantees,
|
||||
or invariants beyond those expressly requested by the user.
|
||||
|
||||
@@ -46,30 +41,19 @@ idiomatic approach unless another path is expressly requested by the user.
|
||||
|
||||
**An implementation detail is not repository policy.** Tests and documentation
|
||||
must not elevate incidental behavior into a durable guarantee or restriction
|
||||
unless that behavior was expressly selected as part of the contract. Existing
|
||||
explicit contracts remain authoritative; changing or weakening one requires a
|
||||
deliberate decision rather than being inferred from this principle.
|
||||
|
||||
Agent-authored plans, tests, documentation, and prior implementations are not
|
||||
evidence that an additional restriction was deliberately approved. Identify the
|
||||
authorizing requirement or decision; when that authority is unclear, surface
|
||||
the ambiguity rather than treating repetition as approval.
|
||||
|
||||
Standard-library guidance does not authorize weakening Narratio's established
|
||||
filesystem, manifest, or publication contracts. Preserve them unless a deliberate
|
||||
decision changes them.
|
||||
unless that behavior was expressly selected as part of the contract.
|
||||
|
||||
## Git Commit Policy
|
||||
|
||||
By default, create a commit after completing each coherent unit of work, using a
|
||||
By default, commit each completed, nonempty unit of work using a
|
||||
concise, plain-English message describing what changed. This policy is standing
|
||||
authorization to create those local commits; a separate user request is not
|
||||
required. An explicit user instruction to leave work uncommitted takes precedence.
|
||||
|
||||
A unit of work is a focused, reviewable outcome, including its relevant tests and
|
||||
documentation. Do not commit after every intermediate edit or create empty commits.
|
||||
documentation.
|
||||
Complete the appropriate validation before committing. If work is incomplete or
|
||||
validation is blocked, report that state rather than presenting it as completed.
|
||||
validation is blocked, report that state accurately.
|
||||
|
||||
Before committing:
|
||||
|
||||
@@ -77,10 +61,10 @@ Before committing:
|
||||
changes. Identify changes that predate the current unit of work.
|
||||
2. Exclude secrets, local environment files, generated junk, and unrelated changes.
|
||||
3. Stage only the files or hunks belonging to the completed unit. Use `git add .`
|
||||
only when every included change belongs to that unit. Do not disturb unrelated
|
||||
staged or unstaged work.
|
||||
4. Review `git diff --staged` and run appropriate checks for the change. Do not
|
||||
repeat checks already passed for unchanged content merely to create a commit.
|
||||
only when every included change belongs to that unit. Preserve unrelated
|
||||
staged and unstaged work.
|
||||
4. Review `git diff --staged` and run appropriate checks for the change. Reuse
|
||||
successful checks for unchanged content.
|
||||
5. Review `git log --oneline -n 10` and use
|
||||
`git commit -m "<concise plain-English commit message>"`.
|
||||
6. Report the commit identifier and any remaining uncommitted work.
|
||||
|
||||
@@ -1,14 +1,41 @@
|
||||
# Architecture
|
||||
# Architecture Policy
|
||||
|
||||
**Base Policy Version:** 1.0
|
||||
**Base Policy Version:** 1.3
|
||||
|
||||
**Last Updated**: 2026-09-25
|
||||
**Last Updated**: 2026-09-28
|
||||
|
||||
This document defines Narratio's intended high-level architecture and the
|
||||
invariants that changes must preserve. Implemented component details belong in
|
||||
the [Internal Overview](../internal/overview.md) and its linked documents.
|
||||
Significant architectural decision history belongs under `docs/adr/` when such
|
||||
records exist.
|
||||
**Upstream Source**: https://gitea.maximumdirect.net/eric/policy/src/commit/d84a38ebab26f048cafbe59a2246700c35d29843/docs/policy/architecture.md
|
||||
|
||||
## Purpose And Ownership
|
||||
|
||||
The adopted policy defines the application's purpose and the architectural
|
||||
constraints contributors must follow. It owns system boundaries, responsibility
|
||||
and dependency rules, established invariants, and explicit non-goals.
|
||||
|
||||
Describe the concrete package inventory and implementation mechanics in internal
|
||||
documentation. Link to canonical public contracts for their exact behavior and
|
||||
to ADRs for decision rationale.
|
||||
|
||||
## Architectural Approach
|
||||
|
||||
Hexagonal architecture is strongly recommended, including encapsulating external
|
||||
integrations and APIs within internal adapters. Keep domain and application
|
||||
logic independent of external integration details, and make dependency direction
|
||||
clear in the adopted policy.
|
||||
|
||||
Implement that separation with proportionate, idiomatic code. Choose interfaces
|
||||
and package layout to serve the application's actual boundaries. Use adapters
|
||||
for collaborators with external integration responsibilities.
|
||||
|
||||
## Adopted Constraints And Implemented Structure
|
||||
|
||||
Architectural constraints govern current and future development. Record
|
||||
implemented structure accurately, proposals and implementation status in the
|
||||
roadmap, and significant decisions and rationale in ADRs. Describe a target
|
||||
structure as implemented when its changes land.
|
||||
|
||||
Constraints must reflect deliberately selected requirements and decisions.
|
||||
Do not promote incidental implementation choices into architectural invariants.
|
||||
|
||||
## System Shape
|
||||
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
# Documentation Policy
|
||||
|
||||
**Base Policy Version:** 1.1
|
||||
**Base Policy Version:** 1.11
|
||||
|
||||
**Last Updated**: 2026-09-25
|
||||
**Last Updated**: 2026-09-28
|
||||
|
||||
**Upstream Source**: https://gitea.maximumdirect.net/eric/policy/src/commit/d84a38ebab26f048cafbe59a2246700c35d29843/docs/policy/documentation.md
|
||||
|
||||
## Purpose
|
||||
|
||||
This policy assigns each documentation topic to one canonical owner. Its goal is
|
||||
to keep Narratio documentation accurate, concise, discoverable, and resistant
|
||||
to keep Narratio's documentation accurate, concise, discoverable, and resistant
|
||||
to drift for users, operators, developers, integrators, and LLM coding agents.
|
||||
|
||||
## Core Rules
|
||||
@@ -16,36 +18,38 @@ to drift for users, operators, developers, integrators, and LLM coding agents.
|
||||
|
||||
Each authoritative fact belongs in one document. A non-owning document may give
|
||||
a short, stable summary for orientation, but it must link to the canonical owner
|
||||
instead of repeating volatile details.
|
||||
for volatile details.
|
||||
|
||||
Volatile details include commands, flags, configuration fields and defaults,
|
||||
stage or integration keys, schemas, file names, paths, status codes, retry
|
||||
behavior, and runtime guarantees. If readers could reasonably treat a statement
|
||||
as a contract, maintain it only in the owning document.
|
||||
module keys, schemas, file names, paths, status codes, retry behavior, and
|
||||
runtime guarantees. If readers could reasonably treat a statement as a
|
||||
contract, maintain it only in the owning document.
|
||||
|
||||
### Current And Future Behavior
|
||||
|
||||
Outside `docs/roadmap/`, documentation describes implemented behavior only.
|
||||
Partial features may be described only to their implemented boundary.
|
||||
|
||||
ADRs are the narrow exception: an ADR may record an accepted architectural
|
||||
decision before implementation, but acceptance must not be presented as proof
|
||||
that the behavior exists. The roadmap owns implementation status and sequencing
|
||||
until the decision is implemented. Current architecture, user, operator,
|
||||
integration, and internal documentation are updated when the behavior lands.
|
||||
Architectural constraints may govern future changes. Describe current structure
|
||||
from implemented behavior.
|
||||
|
||||
ADRs may record an accepted architectural decision before implementation. The
|
||||
roadmap owns implementation status and sequencing until the decision is
|
||||
implemented. Current architecture, user, operator, integration, and internal
|
||||
documentation are updated when the behavior lands.
|
||||
|
||||
### Audience And Detail
|
||||
|
||||
Write for the document's stated audience and include only the detail needed for
|
||||
its owned topic. User and operator docs should not expose implementation detail.
|
||||
Developer docs should link to user-facing and external contracts rather than
|
||||
restate them.
|
||||
its owned topic. Keep user and operator docs focused on using and operating the
|
||||
application. Developer docs should link to user-facing and external contracts
|
||||
for their definitions.
|
||||
|
||||
### Examples
|
||||
|
||||
Complete copyable files belong in `examples/`. Documentation may use the
|
||||
smallest illustrative snippet needed to explain its owned topic, but should link
|
||||
to maintained examples instead of embedding a second complete copy.
|
||||
to maintained examples for complete copyable files.
|
||||
|
||||
Examples must be valid, secret-free, and tested where practical. Commands and
|
||||
configuration used in documentation should match the application.
|
||||
@@ -61,63 +65,69 @@ secret values.
|
||||
|
||||
| Topic | Canonical owner | Owned content | Content owned elsewhere |
|
||||
| --- | --- | --- | --- |
|
||||
| Product orientation and minimal end-to-end quickstart | `README.md` | What Narratio is, why it is useful, one shortest successful invocation, and links onward. | Complete command reference, configuration reference, operational procedures, implementation detail. |
|
||||
| Contributor entry point | `docs/development.md` | Task-oriented reading guide, minimal contributor orientation, baseline validation commands, and links to canonical docs. | Package inventory, architecture rules, subsystem behavior, detailed change recipes. |
|
||||
| Agent policy | `docs/policy/agents.md` | Agent implementation discipline, authority boundaries, and local commit policy. | Application contracts, architecture, testing policy, and contributor procedures. |
|
||||
| Release policy | `docs/policy/release.md` | Versioning, release integrity, documentation and validation requirements, immutability, publication controls, and explicit exceptions. | Repository-specific commands, installation, historical summaries, and CI implementation detail. |
|
||||
| Maintainer release procedure | `docs/release.md` | Prerequisites, concrete candidate validation and publication commands, deliverables, failure recovery, and optional consumer-facing inspection. | General release requirements and exceptions, current application contracts, and historical release summaries. |
|
||||
| Historical release summary | `docs/releases/<tag>.md` | Immutable summary, compatibility, upgrade, and changes for one released version. | Current maintainer procedure and current application contract details. |
|
||||
| Current application architecture | `docs/policy/architecture.md` | System shape, normative ownership, dependency direction, architectural boundaries, invariants, safety properties, and non-goals. | Concrete package inventory, implementation mechanics, contributor procedures, decision history, future work. |
|
||||
| Documentation organization | `docs/policy/documentation.md` | Documentation ownership, audience boundaries, maintenance rules, and ADR/document lifecycle. | Application architecture or product behavior. |
|
||||
| Testing policy | `docs/policy/testing.md` | Test philosophy, risk-based sufficiency, test boundaries, doubles, coverage guidance, regression-test policy, and criteria for adding, rewriting, or deleting tests. | Subsystem behavior, application contracts, subsystem-specific test inventories, and implementation plans. |
|
||||
| CLI contract | `docs/cli.md` | Commands, arguments, flags, invocation semantics, output conventions, and exit behavior. | End-to-end operating procedures, configuration field definitions, runtime filesystem layout, stage implementation details. |
|
||||
| Configuration contract | `docs/config.md` | Discovery and precedence, file schemas, fields, defaults, environment overrides, validation rules, and user-selectable stage or integration settings. | Complete example files, CLI syntax, runtime state lifecycle, implementation details. |
|
||||
| Operations | `docs/operations.md` | Runtime workflows, physical filesystem and remote-state layout, output and diagnostic handling, resume, cleanup, permissions, recovery, and operational limits. | CLI flag syntax, configuration field definitions, logical artifact schemas, implementation mechanics. |
|
||||
| Troubleshooting | `docs/troubleshooting.md` | Symptom-driven diagnosis, likely causes, safe inspection steps and remedies, and links to relevant contracts. | CLI syntax, configuration definitions, operational procedures, integration contracts, implementation mechanics. |
|
||||
| Public HTTP contract, if introduced | `docs/api.md` | Routes, authentication, media types, request and response schemas, status codes, pagination, caching, idempotency, rate limits, and HTTP retry semantics. | Client walkthroughs, upstream or downstream integration internals, implementation detail. |
|
||||
| Consumer guidance, if a public package or API is introduced | `docs/consumers/` | Task-oriented use of the public interface, minimal client examples, and consumer responsibilities. | HTTP wire semantics, external protocol contracts, internal implementation detail. |
|
||||
| External and durable integration contracts | `docs/integrations/` | External file formats and protocols, upstream and downstream contracts, logical artifact paths and schemas, media types, and compatibility behavior. | Physical runtime placement and lifecycle, internal transformations, CLI syntax, configuration defaults. |
|
||||
| Implemented component inventory | `docs/internal/overview.md` | Current packages and components, their implemented responsibilities, and links to focused internal docs. | Normative architecture, contributor reading policy, external contracts. |
|
||||
| Internal component behavior | Other files under `docs/internal/` | Implementation flow, internal collaborators and state transitions, package-local guarantees and failures, and relevant tests. | Global architecture invariants, configuration definitions and defaults, external schemas, operator procedures. |
|
||||
| Architectural decision history | `docs/adr/` | Significant decisions, context, alternatives, rationale, consequences, and supersession history. | Current behavior reference, implementation status, task sequencing. |
|
||||
| Future work and implementation status | `docs/roadmap/` | Proposed, accepted, deferred, or rejected work; implementation status; sequencing; and task breakdowns. | Implemented behavior reference and architectural decision rationale. |
|
||||
| Complete copyable artifacts | `examples/` | Maintained configuration, inputs, and other files intended to be copied or run. | Field-by-field reference, command reference, prose explanation. |
|
||||
| Product orientation and minimal end-to-end quickstart | `README.md` | Purpose, value, shortest successful invocation, and navigation, including licensing and attribution. | Complete command reference, configuration reference, operational procedures, implementation detail. |
|
||||
| Contributor entry point | `docs/development.md` | Task-oriented reading guide, contributor orientation, baseline validation commands, and canonical links. | Package inventory, architecture rules, subsystem behavior, detailed change recipes. |
|
||||
| Application architecture policy | `docs/policy/architecture.md` | System shape, normative ownership, dependency direction, boundaries, invariants, safety properties, and non-goals. | Concrete package inventory, implementation mechanics, contributor procedures, decision history, future work. |
|
||||
| Policy-set provenance and upstream navigation | `docs/policy/meta.md` | Policy-set origin, local authority, adoption baselines, and upstream adoption and update links. | Task-specific reading triggers, detailed adoption procedures, and formal attribution notices. |
|
||||
| Agent policy | `docs/policy/agents.md` | Proportionate, idiomatic implementation; rules against inventing requirements, restrictions, guarantees, or policy. | Application contracts, architecture, testing policy, and contributor procedures. |
|
||||
| Documentation policy | `docs/policy/documentation.md` | Documentation ownership, audience boundaries, maintenance rules, and ADR/document lifecycle. | Application architecture or product behavior. |
|
||||
| Testing policy | `docs/policy/testing.md` | Test philosophy, risk sufficiency, boundaries, doubles, coverage, regressions, and test maintenance. | Subsystem behavior, application contracts, subsystem-specific test inventories, and implementation plans. |
|
||||
| Release policy | `docs/policy/release.md` | Versioning, compatibility, release integrity and immutability, release documentation, proportionate gates, publication controls, completion, and required versus optional checks. | Repository-specific commands, product installation guidance, CLI version semantics, historical release summaries, and CI implementation detail. |
|
||||
| Open source licensing and attribution policy | `docs/policy/oss.md` | License defaults and author choices, COPYRIGHT and attribution formats, license/notice links, discoverability, maintenance, and concrete exceptions. | Component entries, license texts, release commands, and dependency security review. |
|
||||
| Project copyright and license grant | `COPYRIGHT` | Project identity, copyright holders and years, SPDX expression, grant, warranty disclaimer, and third-party statement. | Complete license texts and upstream component attribution. |
|
||||
| Project license text | `LICENSE` | Complete GPLv3 project license text. | Companion dependency license texts and upstream component attribution. |
|
||||
| Upstream component attribution | `docs/oss/attribution.md` | House Format component entries: identity, material scope and modifications where applicable, copyright, license, required notices, and license, notice, and source links. | General attribution policy, exception reasoning, research narratives, compliance commentary, and complete standard license texts. |
|
||||
| Standard dependency license texts | `docs/oss/licenses/` | Complete, verbatim standard license texts shared by applicable entries. | Project-specific upstream notices, attribution prose, and policy interpretation. |
|
||||
| Repository-specific release procedure | `docs/release.md` | Maintainer prerequisites, candidate preparation, validation and publication commands and automated guards, asynchronous deliverables, delivery status, optional consumer verification, and recovery. | General release requirements, product installation guidance, historical release summaries, and current compatibility contracts. |
|
||||
| CLI contract (if applicable) | `docs/cli.md` | Commands, arguments, flags, invocation semantics, and exit codes. | End-to-end operating procedures, configuration field definitions, runtime filesystem layout, module implementation details. |
|
||||
| Configuration contract (if applicable) | `docs/config.md` | Discovery, precedence, schema, fields, defaults, environment overrides, validation, and selectable module and validator keys. | Complete example files, CLI syntax, runtime state lifecycle, module implementation details. |
|
||||
| Operations | `docs/operations.md` | Runtime workflows, physical filesystem and state layout, output, cache and debug handling, resume, cleanup, permissions, recovery, and limits. | CLI flag syntax, configuration field definitions, logical output schemas, implementation mechanics. |
|
||||
| Troubleshooting | `docs/troubleshooting.md` | Symptom-driven diagnosis, likely causes, safe inspection, and remedies. | Canonical commands, configuration definitions, operational procedures, and integration contracts. |
|
||||
| Integration contracts for external components (if applicable) | `docs/integrations/` | External formats and protocols, upstream and downstream contracts, logical output paths and schemas, media types, and compatibility. | Physical runtime placement and lifecycle, internal transformations, CLI syntax, configuration defaults. |
|
||||
| Inventory of implemented internal packages | `docs/internal/overview.md` | Implemented packages and components, responsibilities, and links to focused internal docs. | Normative architecture, contributor reading policy, external contracts. |
|
||||
| Behavior and architecture of internal packages | Other files under `docs/internal/` | Implementation flow, collaborators, state transitions, package-local guarantees and failures, and relevant tests. | Global architecture invariants, configuration definitions and defaults, external schemas, operator procedures. |
|
||||
| Architectural decision records | `docs/adr/` | Significant decisions, context, alternatives, rationale, consequences, and supersession history. | Current behavior reference, implementation status, task sequencing. |
|
||||
| Future work and implementation status | `docs/roadmap/` | Proposed, accepted, deferred, or rejected work; implementation status, sequencing, and task breakdowns. | Implemented behavior reference and architectural decision rationale. |
|
||||
| Release-note history | `docs/releases/` | One checked-in summary per source release under the procedure; the note at its immutable tag is the release record. | Current commands, behavior, contracts, and compatibility definitions. |
|
||||
| Complete copyable artifacts | `examples/` | Maintained configuration, inputs, and other copyable or runnable files. | Field-by-field reference, command reference, prose explanation. |
|
||||
|
||||
Documents that do not exist are required only when the corresponding interface
|
||||
or responsibility exists. Do not create placeholder API, consumer, integration,
|
||||
or operations documents for behavior the application does not have.
|
||||
Create supporting documents for existing interfaces and responsibilities when
|
||||
substantive content is available.
|
||||
|
||||
## Boundary Rules
|
||||
|
||||
### Orientation
|
||||
|
||||
The README owns product orientation. The developer guide routes contributors.
|
||||
Architecture owns normative structure. Internal overview owns the current
|
||||
concrete component map. These documents may link to one another but should not
|
||||
maintain parallel package or behavior descriptions.
|
||||
Link among orientation, architecture, and internal documents; maintain each
|
||||
package or behavior description in its canonical owner.
|
||||
|
||||
### Commands, Configuration, Operations, And Troubleshooting
|
||||
|
||||
CLI documentation answers how to invoke the application. Configuration
|
||||
documentation answers what settings mean. Operations answers what happens to
|
||||
runtime state and how to operate or recover the application. Troubleshooting
|
||||
starts from observable symptoms and links readers to the owning command,
|
||||
configuration, operational, or integration contract. When a workflow crosses
|
||||
these topics, choose the document that owns the task and link to the other
|
||||
contracts.
|
||||
runtime state and how to operate or recover the application. When a workflow
|
||||
crosses these topics, choose the document that owns the task and link to the
|
||||
other contracts. Troubleshooting begins with observable symptoms and links to the owning contract.
|
||||
|
||||
### Releases
|
||||
|
||||
[Release policy](release.md) owns requirements and explicit exceptions;
|
||||
[the release procedure](../release.md) owns the commands used to satisfy them.
|
||||
Release notes record history at an immutable tag. Neither the procedure nor a
|
||||
release note may silently weaken policy or substitute for updates to current
|
||||
canonical documentation.
|
||||
The release policy defines requirements and invariants that every release must
|
||||
satisfy. The repository-specific release procedure defines the commands and
|
||||
workflow maintainers use to satisfy that policy. Release notes record history
|
||||
at immutable tags. Maintain current behavior in its canonical documentation,
|
||||
update it with the corresponding behavior changes, and keep release procedures
|
||||
consistent with adopted policy.
|
||||
|
||||
### Project Licensing And Upstream Attribution
|
||||
|
||||
README and release documents link to the canonical licensing and attribution
|
||||
materials under the [OSS policy](oss.md). The release procedure owns URL
|
||||
construction and publication mechanics.
|
||||
|
||||
### Contracts And Implementation
|
||||
|
||||
Integration and API documents define externally observable shapes and
|
||||
semantics. Internal documents explain how Narratio implements or consumes those
|
||||
semantics. Internal documents explain how this application implements or consumes those
|
||||
contracts. Internal docs may name a field, file, or protocol to identify a
|
||||
dependency, but must link to its canonical contract for the definition.
|
||||
|
||||
@@ -126,8 +136,7 @@ dependency, but must link to its canonical contract for the definition.
|
||||
This policy owns what documentation and examples may contain. Architecture owns
|
||||
application security invariants. Configuration owns credential-supply
|
||||
mechanisms. Operations owns permissions and handling of sensitive runtime
|
||||
artifacts. Troubleshooting owns safe diagnostic and remediation guidance.
|
||||
Internal docs own implementation mechanisms only.
|
||||
artifacts. Internal docs own implementation mechanisms only.
|
||||
|
||||
## Architecture Decision Records
|
||||
|
||||
|
||||
27
docs/policy/meta.md
Normal file
27
docs/policy/meta.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Policy Set Provenance
|
||||
|
||||
**Base Policy Version:** 1.0
|
||||
|
||||
**Last Updated**: 2026-09-28
|
||||
|
||||
**Upstream Source**: https://gitea.maximumdirect.net/eric/policy/src/commit/d84a38ebab26f048cafbe59a2246700c35d29843/docs/policy/meta.md
|
||||
|
||||
## Origin And Local Authority
|
||||
|
||||
This repository's policy set is adapted from
|
||||
[Standard Repository Policies](https://gitea.maximumdirect.net/eric/policy).
|
||||
The adopted local policies govern work in this repository. Upstream revisions
|
||||
become local policy through deliberate adoption, preserving local decisions.
|
||||
Each policy's `Upstream Source` identifies its adopted baseline.
|
||||
|
||||
## Adoption And Updates
|
||||
|
||||
For policy adoption, upstream revision reviews, and updates, consult the
|
||||
[upstream adoption and update guide](https://gitea.maximumdirect.net/eric/policy/src/branch/main/docs/adoption.md).
|
||||
That guide and the reference example collection are maintained upstream and
|
||||
accessed through links. Keep discovery links pointed at the current upstream
|
||||
project and guide; keep adopted-source and example links pinned to commits.
|
||||
|
||||
The local [developer guide](../development.md) routes tasks to applicable
|
||||
policies. Formal credit and licensing notices for the copied policy material
|
||||
belong in the local [attribution document](../oss/attribution.md).
|
||||
217
docs/policy/oss.md
Normal file
217
docs/policy/oss.md
Normal file
@@ -0,0 +1,217 @@
|
||||
# Open Source Licensing And Attribution Policy
|
||||
|
||||
**Base Policy Version:** 1.8
|
||||
|
||||
**Last Updated**: 2026-09-28
|
||||
|
||||
**Upstream Source**: https://gitea.maximumdirect.net/eric/policy/src/commit/d84a38ebab26f048cafbe59a2246700c35d29843/docs/policy/oss.md
|
||||
|
||||
## Purpose And Scope
|
||||
|
||||
This policy defines project licensing conventions and a repeatable House Format
|
||||
for upstream attribution and license notices. It covers the project's own code
|
||||
and upstream components incorporated into or distributed with the application
|
||||
or library, including relevant transitive dependencies and copied code,
|
||||
documentation, or assets.
|
||||
Determine treatment from the component's terms and actual use.
|
||||
|
||||
Consulting development guidance or using tooling alone does not require an
|
||||
attribution entry. Copying or adapting documentation for inclusion in the
|
||||
repository is different: preserve its applicable attribution and license terms.
|
||||
A material's role as development guidance does not exempt copied documents.
|
||||
Apply any express permissions for attribution-free reuse of example formatting.
|
||||
|
||||
The baseline is a publicly available source repository with releases published
|
||||
alongside it. The format is independent of language, forge, and build system.
|
||||
It does not require attribution for every development tool, establish license
|
||||
compatibility, or resolve every obligation arising from use or distribution.
|
||||
|
||||
## Canonical Locations
|
||||
|
||||
The [documentation policy](documentation.md) assigns ownership:
|
||||
|
||||
- `COPYRIGHT`: project name, copyright statements, SPDX expression, grant,
|
||||
warranty disclaimer, and third-party statement.
|
||||
- `LICENSE` contains the complete, unmodified project license text, including
|
||||
incorporated companion text. Dependency attribution does not relicense the project.
|
||||
- `docs/oss/attribution.md`: canonical component entries.
|
||||
- `docs/oss/licenses/`: complete, verbatim standard and applicable companion texts.
|
||||
|
||||
Use recognizable license filenames, such as `Apache-2.0.txt` or `LGPL-3.0.txt`.
|
||||
A shared standard text may serve multiple entries. Keep explanations outside
|
||||
license texts and preserve distinct versions and exceptions.
|
||||
|
||||
## Narratio Licensing Scope
|
||||
|
||||
Narratio application code remains GPL-3.0-or-later under its existing
|
||||
[COPYRIGHT](../../COPYRIGHT) and [LICENSE](../../LICENSE). Its source and release
|
||||
artifacts are hosted on Gitea; separately installed subprocess applications are
|
||||
not incorporated merely because Narratio invokes them. The
|
||||
[release procedure](../release.md) owns publication mechanics. Policy documents
|
||||
adapted from Standard Repository Policies retain CC-BY-SA-4.0 under the distinct
|
||||
scope recorded in COPYRIGHT and [attribution](../oss/attribution.md).
|
||||
|
||||
## Upstream Reference Examples
|
||||
|
||||
Use the commit-pinned upstream examples to create actual project notices.
|
||||
Retain their links and keep the example collection upstream; keep applicable
|
||||
license texts locally as specified above.
|
||||
|
||||
## Project Licensing
|
||||
|
||||
Unless the author specifies otherwise, use **GPL version 3 or later**
|
||||
(`GPL-3.0-or-later`) for applications and **LGPL version 3 or later**
|
||||
(`LGPL-3.0-or-later`) for libraries. An author's explicit choice takes precedence:
|
||||
for example, a one-off script may use MIT. Such a choice requires no exception
|
||||
rationale, additional approval, or compensating controls under this policy.
|
||||
|
||||
These defaults guide new license selection. Adopting this policy does not
|
||||
relicense existing code or override third-party terms. Preserve an existing
|
||||
license unless the author deliberately changes it. For mixed-purpose projects,
|
||||
follow the author's selected scope rather than inferring different licenses for
|
||||
individual packages.
|
||||
|
||||
Use the upstream [application COPYRIGHT example](https://gitea.maximumdirect.net/eric/policy/src/commit/a469273adda336625f96b9d769ea27b33999f146/examples/licensing/application/COPYRIGHT)
|
||||
or [library COPYRIGHT example](https://gitea.maximumdirect.net/eric/policy/src/commit/a469273adda336625f96b9d769ea27b33999f146/examples/licensing/library/COPYRIGHT)
|
||||
to create the project’s root `COPYRIGHT` file.
|
||||
Use verified project names, contribution years, and copyright holders.
|
||||
For another selected license, adapt the grant, SPDX expression, disclaimer, and
|
||||
text references together to reflect the author's selected grant.
|
||||
|
||||
For GPLv3 projects, copy the complete GPLv3 text into `LICENSE`. For LGPLv3
|
||||
projects, place the complete LGPLv3 text followed by the complete GPLv3 text in
|
||||
`LICENSE`; the LGPL incorporates the GPL terms. Keep the texts unmodified and
|
||||
place project-specific statements in `COPYRIGHT`. For the default grants, the
|
||||
grant and SPDX expression in `COPYRIGHT` must expressly identify `or-later`;
|
||||
follow the author’s choice if a different grant is selected.
|
||||
|
||||
For other licenses, provide their complete text and any required project-specific
|
||||
fields; the standard reference collection remains unchanged. Keep `COPYRIGHT`,
|
||||
`LICENSE`, SPDX expressions, and README descriptions consistent with the actual
|
||||
grant. This convention introduces no blanket requirement for per-file headers;
|
||||
preserve notices or add them where the applicable terms require them.
|
||||
|
||||
Identify separately licensed documentation or assets in the project grant, with
|
||||
links to their attribution and license information. An application's default
|
||||
code license does not override the terms of incorporated documentation.
|
||||
|
||||
## Upstream Attribution House Format
|
||||
|
||||
Begin `docs/oss/attribution.md` with `# Open Source Attribution Notices`,
|
||||
followed directly by component entries. These comprise the complete document.
|
||||
|
||||
Each entry presents these five fields in order, with blank lines between them:
|
||||
|
||||
1. **Project name** as a level-two heading. An optional identification paragraph
|
||||
may follow, such as `Selected module: MODULE at VERSION.` with the module and
|
||||
version in backticks. For copied documentation, a concise `Material:` sentence
|
||||
may identify the affected files and whether they were adapted or copied
|
||||
without modification. A factual qualifier such as `(transitive dependency)`
|
||||
is permitted. Limit optional identification prose to factual component and
|
||||
material scope.
|
||||
2. **Upstream copyright statement or statements**, preserving their wording.
|
||||
Put multiple statements in separate paragraphs. Include this field when the
|
||||
selected upstream source supplies an applicable statement; otherwise, omit it.
|
||||
3. **SPDX license identifier or expression**, when applicable, using
|
||||
`SPDX-License-Identifier: EXPRESSION`.
|
||||
4. **License and notice links**, beginning `License and notices:`, separated
|
||||
by ` | `, and ending with a period. Label local standard texts by license
|
||||
name, such as `MIT` or `Apache 2.0`. Label upstream files by their actual
|
||||
filenames, such as `COPYRIGHT`, `LICENSE`, `NOTICE`, or `PATENTS`.
|
||||
5. **Source repository link**, rendered exactly as `[Source](COMMIT_URL).`.
|
||||
|
||||
Use the upstream [attribution example](https://gitea.maximumdirect.net/eric/policy/src/commit/a469273adda336625f96b9d769ea27b33999f146/examples/licensing/attribution.md)
|
||||
to create the project’s `docs/oss/attribution.md`.
|
||||
The example illustrates omitted fields and multiple copyrights and licenses.
|
||||
Replace the uppercase placeholders and illustrative URLs with actual component
|
||||
information. Local license links are relative to the destination
|
||||
`docs/oss/attribution.md`; copy the applicable texts into its `licenses/`
|
||||
directory. Do not copy example entries for components the project does not use.
|
||||
|
||||
These are five fields, not a line limit. Omit the SPDX field when no applicable
|
||||
identifier exists; identify nonstandard terms through the linked text. Preserve
|
||||
licensing alternatives and exceptions, and record a selected option when
|
||||
relevant through the factual license identification. Do not invent an identifier
|
||||
or silently resolve an unsettled licensing choice.
|
||||
|
||||
Keep entries factual. Do not add agent-authored explanations of license
|
||||
expressions, file-level license scope, research performed, retained source
|
||||
notices, or compliance conclusions. Avoid filler such as "none is invented
|
||||
here" and embellished link labels such as "upstream LICENSE", "additional
|
||||
patent grant", or "at the imported commit". Preserve actual required upstream
|
||||
content; this rule excludes editorial additions, not required notices. Policy
|
||||
interpretation and exception reasoning belong in the adopted OSS policy or an
|
||||
appropriate decision record, not the attribution document.
|
||||
|
||||
## License Texts And Upstream Links
|
||||
|
||||
Link standard license texts to their local copies. Link project-specific
|
||||
notices to their upstream copies. Every upstream repository or notice link must
|
||||
identify the exact commit corresponding to the
|
||||
imported version, including the selected source revision for copied material.
|
||||
|
||||
Classify material according to its contents. An upstream `LICENSE`,
|
||||
`COPYING`, or similar file may contain project-specific notices or exceptions
|
||||
in addition to standard wording. Link both the local standard text and the
|
||||
commit-specific upstream file when needed. Make companion license texts directly
|
||||
reachable from the entry.
|
||||
|
||||
For project-specific license and attribution material, this policy accepts
|
||||
direct links to the applicable upstream texts as satisfying reproduction,
|
||||
inclusion, or copy requirements. This is the adopted house interpretation.
|
||||
Agents must apply it without adding local-copy requirements or seeking repeated
|
||||
approval solely because a license uses those terms.
|
||||
|
||||
This interpretation concerns notice reproduction. Concrete obligations such as
|
||||
marking modified files or supplying corresponding source receive their own
|
||||
applicable treatment. Preserve required notices already present in incorporated
|
||||
source files; the central attribution entry does not authorize stripping them.
|
||||
|
||||
## Discoverability
|
||||
|
||||
End Narratio's README with two friendly statements linking to its actual grant
|
||||
in root `COPYRIGHT` and to `docs/oss/attribution.md`, using paths relative to
|
||||
the README. The statements identify Narratio's GPL v3.0-or-later grant and make
|
||||
the open source attribution notices discoverable.
|
||||
|
||||
Each new checked-in release document and its hosted download page must end
|
||||
with links whose visible text is `COPYRIGHT | LICENSE | ATTRIBUTION`. Use absolute
|
||||
URLs to those files at the release's immutable tag or corresponding immutable source
|
||||
revision so the links work in both locations. This release navigation is distinct
|
||||
from upstream component links, which must use the imported commit.
|
||||
|
||||
Reuse the checked-in release document as the hosted release body where supported.
|
||||
The release procedure owns concrete URLs and publication mechanics for delivering
|
||||
the links through the selected channel. Do not maintain duplicate notice lists.
|
||||
These conventions do not by themselves require separate downloadable license
|
||||
assets, source bundles, or a different binary package format.
|
||||
|
||||
## Maintenance And Exceptions
|
||||
|
||||
Update project licensing statements together when the author changes the grant
|
||||
or its scope. Update upstream notices in the change that adds, removes, upgrades,
|
||||
copies, or changes the distribution of a relevant component. Check the selected source's license
|
||||
and notices rather than assuming they are unchanged. Update affected entries,
|
||||
commit links, and texts; retain historical versions through Git.
|
||||
|
||||
Check affected statements, faithful standard-text copies, and link destinations
|
||||
as part of ordinary change review. For a future release tag, check intended file
|
||||
paths against the candidate source; the tag need not resolve remotely before
|
||||
publication. Do not add publication-time network checks, CI polling, recurring
|
||||
legal sign-offs, mandatory scanners, or a full software bill of materials merely
|
||||
to implement this policy.
|
||||
|
||||
Use the House Format routinely. Raise an exception only for a concrete obligation
|
||||
or unresolved rights question it does not address, including any arising from a
|
||||
particular distribution channel. Record the issue and selected treatment in the
|
||||
adopted OSS policy or an appropriate decision record. Attribution entries
|
||||
contain the resulting factual identification and required material, without
|
||||
repeating that reasoning. Resolve the issue before the affected use or
|
||||
distribution without reopening settled choices.
|
||||
Common ownership of projects is neither required nor a blanket exception.
|
||||
|
||||
Apply the formatting convention prospectively. Do not rewrite published tags,
|
||||
notes, binaries, or checksums to retrofit it. Address actual omissions deliberately
|
||||
under the applicable terms and the [release correction policy](release.md#immutability-and-failure-recovery).
|
||||
Ordinary attribution maintenance and release links are preparation work, not new
|
||||
release approval gates.
|
||||
@@ -1,54 +1,60 @@
|
||||
# Release Policy
|
||||
|
||||
**Base Policy Version:** 1.0
|
||||
**Base Policy Version:** 1.4
|
||||
|
||||
**Last Updated**: 2026-09-25
|
||||
**Last Updated**: 2026-09-28
|
||||
|
||||
**Upstream Source**: https://gitea.maximumdirect.net/eric/policy/src/commit/d84a38ebab26f048cafbe59a2246700c35d29843/docs/policy/release.md
|
||||
|
||||
## Purpose
|
||||
|
||||
This policy defines the minimum requirements for selecting, validating,
|
||||
publishing, verifying, and correcting releases. Its goal is to make every
|
||||
release intentional, reproducible from an exact source revision, documented
|
||||
for consumers, and safe from retrospective replacement.
|
||||
This policy defines a proportionate workflow for validating and publishing an
|
||||
intended source revision under a fresh version. Releases should require little
|
||||
routine intervention, avoid repeated work, and preserve published contents.
|
||||
|
||||
The repository-specific commands that implement these requirements belong in
|
||||
`docs/release.md`. Historical release summaries belong in `docs/releases/`.
|
||||
Neither document may weaken this policy, including its explicit repository
|
||||
exceptions.
|
||||
The repository-specific commands belong in `docs/release.md`. Historical release
|
||||
summaries belong in `docs/releases/`. The procedure must agree with the adopted
|
||||
policy and link to it rather than introduce additional release requirements.
|
||||
|
||||
## Release Model
|
||||
## Release Model And Completion
|
||||
|
||||
A release consists of:
|
||||
A source release identifies one exact committed source revision through an
|
||||
immutable version tag and a version-matched, checked-in release note. The
|
||||
primary release branch is `main` unless the adopted policy specifies otherwise.
|
||||
The procedure must name the authoritative publication remote.
|
||||
|
||||
- one exact source commit reachable from the repository's primary branch;
|
||||
- one immutable version tag identifying that commit;
|
||||
- one version-matched, checked-in release note; and
|
||||
- every artifact, image, package, registry entry, or other deliverable the
|
||||
repository declares for that release.
|
||||
A successful push of the intended tag, with its source commit available on the
|
||||
authoritative primary branch, completes the release. The source commit may be
|
||||
pushed before the tag or published together with it through an atomic push.
|
||||
The procedure must choose and document the supported approach.
|
||||
|
||||
The repository's primary branch is `main` unless an adopted policy documents
|
||||
an exception. A release candidate must be committed and pushed to that branch
|
||||
before its release tag is published.
|
||||
Release commands must finish at successful publication. They must not wait for
|
||||
or poll CI, require successful CI status, inspect downloadable artifacts, or
|
||||
check consumer installation or Go module availability as completion gates.
|
||||
A failed or ambiguous push requires resolving the authoritative remote state
|
||||
before declaring success or retrying; successful pushes do not require a
|
||||
separate remote read-back gate.
|
||||
|
||||
The source tag is the authoritative release identity. Published deliverables
|
||||
must be traceable to the tagged source and must agree with its version. A
|
||||
repository may publish source only. When it publishes additional deliverables,
|
||||
its release procedure must enumerate them and define how each is built,
|
||||
identified, published, and verified.
|
||||
Repositories may publish source only. Additional binaries, images, packages,
|
||||
checksums, or other declared deliverables may be published asynchronously from
|
||||
the tagged source. The procedure must identify those deliverables and the
|
||||
responsibility of their automation. Published deliverables must be traceable
|
||||
to that source and identify the same version.
|
||||
|
||||
Release automation may validate or publish a release only when its exact
|
||||
responsibility is documented. Automation must not silently change the source
|
||||
candidate, move a published tag, replace a published deliverable, or repair a
|
||||
release in place.
|
||||
Track source-release completion and artifact delivery separately. Report delivery
|
||||
failures and optional investigations under artifact-delivery status.
|
||||
|
||||
## Versioning And Compatibility
|
||||
|
||||
Stable releases use Semantic Versioning in the form `vMAJOR.MINOR.PATCH`, with
|
||||
no leading zeroes. Each version must be unused locally and in every configured
|
||||
remote or publication channel before publication begins.
|
||||
no leading zeroes. Prereleases require an explicit adopted policy defining
|
||||
their format and use.
|
||||
|
||||
Unless an adopted policy explicitly supports and defines prereleases,
|
||||
prerelease versions are not permitted.
|
||||
The selected version must be unused locally and on the authoritative remote.
|
||||
Do not require queries to every configured remote or publication service.
|
||||
A version known to have already been published must not be reused, even if the
|
||||
normal guards do not inspect that channel. Adding a distribution channel
|
||||
requires a deliberate update to the policy and procedure where needed.
|
||||
|
||||
For releases at or after `v1.0.0`:
|
||||
|
||||
@@ -61,161 +67,154 @@ configuration, data, integration, or compatibility contract when the release
|
||||
note explains the impact and required consumer action. A patch release must
|
||||
not intentionally break those contracts within its minor line.
|
||||
|
||||
A repository with additional compatibility promises must define them in its
|
||||
adopted policy or canonical contract documentation. A release note may explain
|
||||
a compatibility change, but it must not redefine the current compatibility
|
||||
contract.
|
||||
Additional compatibility promises and deliberate exceptions belong in the
|
||||
adopted policy or canonical contract documentation. Release notes explain
|
||||
changes; they do not redefine current compatibility contracts.
|
||||
|
||||
## Release Documentation
|
||||
## Release Documentation And Preparation
|
||||
|
||||
Every release made under this policy must include
|
||||
`docs/releases/<version>.md` in the tagged source tree. The filename must use
|
||||
the complete version tag, and the document must begin with a title containing
|
||||
the product name and that exact version.
|
||||
Every new release must include `docs/releases/<version>.md` in the tagged
|
||||
source tree. Use the complete version tag as the filename and begin with a
|
||||
title containing the product name and that exact version.
|
||||
|
||||
Every new release note must contain these sections:
|
||||
Include a short summary and any relevant compatibility impact or upgrade
|
||||
instructions. Choose sections suited to the release and keep the note
|
||||
proportionate to the change.
|
||||
|
||||
```markdown
|
||||
# <Product> vMAJOR.MINOR.PATCH
|
||||
Keep exact current contracts in their canonical documents and update affected
|
||||
documentation with the behavior change. Link to those documents from the note
|
||||
where useful. If annotated tags are used, derive their summary from the
|
||||
checked-in note.
|
||||
|
||||
This release ...
|
||||
Include the release footer defined by the [OSS policy](oss.md#discoverability)
|
||||
in each new release document and preserve it on the hosted download page. The
|
||||
release procedure defines the concrete URLs and publication mechanics. Prepare
|
||||
these links with the release note; they do not add a network check or approval
|
||||
gate.
|
||||
|
||||
## Summary
|
||||
Handle version selection, release-note content, and retirement of completed
|
||||
roadmaps during preparation. Preserve planned and deferred work and repair
|
||||
affected links when retiring roadmaps. Reuse ordinary change review for
|
||||
unintended files, credentials, and private data. Scope release-content review
|
||||
to the tagged source.
|
||||
|
||||
## Compatibility
|
||||
## Candidate Validation
|
||||
|
||||
## Upgrade
|
||||
Provide one publication command that validates the final committed candidate,
|
||||
checks publication state, and publishes the intended refs. A validation-only
|
||||
mode or command may be provided for diagnosis, but must not be a required step
|
||||
before publication repeats the same checks.
|
||||
|
||||
## Changes
|
||||
```
|
||||
Run the complete deterministic, offline default test suite once for the final
|
||||
candidate, following the [testing policy](testing.md). For repositories that
|
||||
publish builds, verify the required build targets. Select those targets for
|
||||
the application's actual support commitments; native testing on each platform
|
||||
and access to particular hardware are not default release prerequisites.
|
||||
|
||||
Use an explicit statement such as "No action required" when a section has no
|
||||
substantive content.
|
||||
Additional gates must address a concrete risk that the existing checks do not
|
||||
adequately cover. Do not automatically require linting, race testing, module
|
||||
hygiene audits, documentation audits, credential scans, example validation, or
|
||||
expanded platform matrices solely because they are possible. Retain such
|
||||
checks when their distinct protection justifies their cost. A one-time migration
|
||||
check must not silently become a permanent release requirement.
|
||||
|
||||
Release notes are immutable historical summaries. They should link to current
|
||||
canonical documentation for exact behavior. Every affected canonical document
|
||||
must be updated in the same candidate; a release note must not substitute for
|
||||
current documentation or defer required documentation changes.
|
||||
Release tests must not require real credentials, mutable application services,
|
||||
paid APIs, provider probes, or inference calls. The procedure may describe dependency
|
||||
preparation separately from offline validation.
|
||||
|
||||
## Candidate Preparation And Validation
|
||||
Avoid duplicate validation across release phases. Successful checks for the
|
||||
same final candidate need not be repeated solely to satisfy another phase;
|
||||
any reuse must clearly apply to that exact candidate. Persistent validation
|
||||
caches are not required. If the candidate changes, validate the new candidate.
|
||||
Cheap publication-state checks may be repeated immediately before pushing
|
||||
because local or remote state may have changed during validation.
|
||||
|
||||
Each repository must provide one documented release-check command or script
|
||||
that exercises the complete set of automated source-candidate gates. The
|
||||
repository-specific procedure must state all additional manual gates.
|
||||
Automate mechanical guards. Human review gates are strongly disfavored: add one
|
||||
only through an explicit project-specific policy decision explaining the
|
||||
concrete risk and why ordinary change review or automation is insufficient.
|
||||
Do not add routine confirmations for checks the command can perform itself.
|
||||
|
||||
The required gates are:
|
||||
## Narratio Candidate Checks
|
||||
|
||||
- dependency or module hygiene appropriate to the language and ecosystem;
|
||||
- the complete deterministic, offline default test suite;
|
||||
- static analysis and linting used by the repository;
|
||||
- formatting and whitespace checks;
|
||||
- validation of maintained examples, configuration, schemas, generated
|
||||
sources, and documentation commands where applicable;
|
||||
- review of changed local documentation links;
|
||||
- removal of obsolete roadmap documents under `docs/roadmap/` that describe
|
||||
completed work included in the release; and
|
||||
- review for unintended files, generated output, credentials, private data,
|
||||
and unrelated changes.
|
||||
Narratio's candidate checker adds the following checks to the one full,
|
||||
race-enabled offline suite:
|
||||
|
||||
- `go mod tidy -diff` detects an incomplete checked-in module graph without
|
||||
changing source.
|
||||
- Tracked Go formatting and diff whitespace checks catch inexpensive source
|
||||
hygiene defects before publication.
|
||||
- Race instrumentation adds distinct coverage for concurrent I/O,
|
||||
cancellation, and shared state.
|
||||
- `go vet ./...` detects static issues not established by runtime tests.
|
||||
- The asset builder verifies the declared Linux amd64, Linux arm64, and
|
||||
best-effort macOS arm64 binaries and checks the embedded version on the host.
|
||||
|
||||
The checker uses `GOWORK=off` and readonly module mode for tests, vet, and
|
||||
builds. Versioned module replacements are allowed; filesystem replacements
|
||||
are not release inputs. Workspace and vendor files are not prohibited solely
|
||||
by their presence.
|
||||
|
||||
## Publication Guards
|
||||
|
||||
Immediately before publication, the maintainer or release automation must
|
||||
fetch the current primary branch and tags from the authoritative remote and
|
||||
verify all of the following:
|
||||
Automate the checks needed to publish the intended source under a fresh version:
|
||||
|
||||
- the version has the required format and is not already published;
|
||||
- the current branch is the primary release branch;
|
||||
- the worktree and index are clean;
|
||||
- the current commit is the recorded, validated candidate;
|
||||
- the authoritative remote branch points to that same commit;
|
||||
- the matching release note exists in that commit and has the required title
|
||||
and sections;
|
||||
- all required approvals and automated gates succeeded for that commit; and
|
||||
- no local or remote tag already uses the selected version.
|
||||
- the version has the adopted format and is unused locally and on the
|
||||
authoritative remote;
|
||||
- the worktree and index are clean on the primary release branch;
|
||||
- the source being published is the exact candidate that passed validation,
|
||||
including its matching release note;
|
||||
- the remote primary branch already identifies that candidate, or an atomic
|
||||
source/tag push will advance it to that candidate without discarding remote
|
||||
history; and
|
||||
- the tag identifies the validated candidate and only the intended refs are
|
||||
published.
|
||||
|
||||
Create the version tag against the guarded commit and verify its target before
|
||||
publishing it. Publish only the exact intended ref and deliverables. Broad
|
||||
operations such as `git push --tags` are discouraged because they can publish
|
||||
unreviewed refs unrelated to the release.
|
||||
Fetch the authoritative branch and tag state as needed for these checks.
|
||||
Do not force branch or tag updates to bypass a failed guard. Publish explicit
|
||||
refs rather than all local tags. Do not require CI success, publication-service
|
||||
availability checks, or a separate manual confirmation for each guard.
|
||||
|
||||
The repository-specific procedure must make these guards executable or give
|
||||
copyable commands for performing them.
|
||||
## Immutability And Failure Recovery
|
||||
|
||||
## Immutability And Correction
|
||||
Published version tags and published contents are immutable. Do not move,
|
||||
overwrite, recreate, or delete a published tag, or replace a published artifact,
|
||||
checksum, signature, provenance statement, or release note under that version.
|
||||
The checked-in note at the immutable tag is that release's historical record.
|
||||
|
||||
Published version tags and published deliverables are immutable. Do not move,
|
||||
overwrite, recreate, or delete a published tag. Do not replace an artifact,
|
||||
image, package, checksum, signature, provenance statement, or release note
|
||||
under an already published version.
|
||||
If validation fails before publication, correct and commit the candidate and
|
||||
rerun the publication command. If a push fails or its outcome is ambiguous,
|
||||
inspect the authoritative remote before retrying. Remove an unpublished local
|
||||
tag only after confirming it was never published or used by a release channel.
|
||||
An unavailable remote leaves publication status unknown; do not overwrite a tag
|
||||
to resolve uncertainty.
|
||||
|
||||
If validation fails before publication, correct the candidate, rerun the
|
||||
complete gates, and repeat the publication guards. An unpublished local tag
|
||||
may be removed after confirming that it was never published or used by a
|
||||
release channel.
|
||||
Transient network, authentication, CI, or consumer-availability failures do not
|
||||
by themselves require a new version. Asynchronous delivery may be retried from
|
||||
the same immutable tag. Missing artifacts may be published later, provided
|
||||
existing published contents are not replaced and the additions remain consistent
|
||||
with the tagged source and any already-published checksum manifest. If that
|
||||
cannot be achieved, publish a new version.
|
||||
|
||||
If publication or post-publication verification reveals a defect, leave the
|
||||
published release intact. Correct the defect on the primary branch, choose a
|
||||
new patch version or other semantically appropriate new version, write a new
|
||||
matching release note, and perform the complete release procedure again.
|
||||
|
||||
A distribution channel's supported yank, deprecation, or advisory mechanism
|
||||
may warn consumers away from a defective release, but it must not replace that
|
||||
release's contents or reuse its version.
|
||||
A defect requiring changes to published source or contents requires a corrected
|
||||
commit, a new semantically appropriate version, a matching release note, and
|
||||
the release procedure again. Leave the original release intact. A channel's
|
||||
yank, deprecation, or advisory mechanism may warn consumers away from a defective
|
||||
release without replacing its contents or reusing its version.
|
||||
|
||||
## Repository Release Procedure
|
||||
|
||||
Every adopting repository must maintain `docs/release.md` as the canonical
|
||||
maintainer runbook for implementing this policy. It must define, in execution
|
||||
order:
|
||||
Maintain `docs/release.md` as a short, executable maintainer runbook. It must
|
||||
identify:
|
||||
|
||||
1. maintainer prerequisites and required access;
|
||||
2. version selection and compatibility review;
|
||||
3. release-note creation;
|
||||
4. candidate preparation and the complete validation command;
|
||||
5. candidate commit, push, and exact commit recording;
|
||||
6. publication guards;
|
||||
7. exact tag and deliverable publication commands;
|
||||
8. authoritative remote and consumer-facing verification; and
|
||||
9. failure handling and correction.
|
||||
1. prerequisites, primary branch, and authoritative remote;
|
||||
2. version and release-note preparation;
|
||||
3. one publication command with its selected local checks and automated guards;
|
||||
4. declared deliverables, required build targets, and automation responsibilities;
|
||||
5. the successful-push completion point and separately reported delivery status;
|
||||
and
|
||||
6. failure handling, ambiguous-push recovery, and asynchronous delivery retries.
|
||||
|
||||
The procedure should use copyable, fail-fast commands where practical. It must
|
||||
name the primary branch, authoritative remote, tag form, published
|
||||
deliverables, supported build targets, release automation responsibilities,
|
||||
and consumer verification path. It must link to this policy instead of
|
||||
restating or redefining its requirements.
|
||||
|
||||
## Policy Exceptions
|
||||
|
||||
### Tag-push completion and asynchronous deliverables
|
||||
|
||||
Narratio's automated release responsibility ends when the exact intended tag is
|
||||
successfully pushed to `origin`. It must not wait for, poll, or check CI/Gitea
|
||||
results, download assets, or verify their checksums as a completion condition.
|
||||
Binary and checksum publication is asynchronous; consumer-facing inspection is
|
||||
optional follow-up, not a gate on the source release.
|
||||
|
||||
This deliberately qualifies the base policy's complete-deliverable and
|
||||
post-publication verification requirements. CI reliability is outside the
|
||||
release command's scope; an unavailable publication service must not cause an
|
||||
automated releaser to wait indefinitely or claim to repair a published version.
|
||||
|
||||
Compensating controls are complete local candidate validation (including supported
|
||||
cross-builds and a host version check), exact source/tag guards, immutable source
|
||||
tags, asynchronous build validation, and non-overwriting asset publication.
|
||||
Successful tag publication is not evidence that binary assets are available.
|
||||
Optional inspection and corrective-release procedures belong in
|
||||
[the release procedure](../release.md).
|
||||
|
||||
### Authoritative publication scope
|
||||
|
||||
Narratio's synchronous publication guards inspect the authoritative `origin`
|
||||
remote and its `main` branch, not every configured Git remote or a Gitea release
|
||||
entry. The command does not add release-service or registry availability checks.
|
||||
This qualifies the base policy's all-channel unused-version requirement.
|
||||
|
||||
Other remotes are not Narratio release authorities, and Gitea asset publication
|
||||
is asynchronous. The compensating controls are local and origin tag uniqueness,
|
||||
exact candidate matching, and the publisher's non-overwrite settings. Any known
|
||||
already-published version or conflicting deliverable remains ineligible for
|
||||
reuse: choose a new version rather than bypassing guards. A future additional
|
||||
distribution channel requires deliberate policy/procedure updates.
|
||||
Use copyable commands where practical. Keep optional diagnostics and consumer
|
||||
verification clearly optional. The procedure must not turn preparation work,
|
||||
ordinary change review, or post-publication investigation into additional
|
||||
release gates.
|
||||
|
||||
@@ -1,43 +1,32 @@
|
||||
# Testing Policy
|
||||
|
||||
**Base Policy Version:** 1.0
|
||||
**Base Policy Version:** 1.3
|
||||
|
||||
**Last Updated**: 2026-09-25
|
||||
**Last Updated**: 2026-09-28
|
||||
|
||||
**Upstream Source**: https://gitea.maximumdirect.net/eric/policy/src/commit/d84a38ebab26f048cafbe59a2246700c35d29843/docs/policy/testing.md
|
||||
|
||||
## Purpose
|
||||
|
||||
Our tests exist to make **incorrect changes expensive and correct changes cheap**.
|
||||
|
||||
We do not optimize for test count, line coverage, exhaustive isolation, or the fewest possible tests. We optimize for sufficient confidence in important behavior while imposing as little unnecessary friction as possible on future development.
|
||||
We optimize for sufficient confidence in important behavior while minimizing friction on future development.
|
||||
|
||||
## Every test has a cost
|
||||
|
||||
Testing is not an unqualified good. Every test imposes both an immediate cost and a continuing lifetime cost.
|
||||
|
||||
A test must be:
|
||||
|
||||
- written and reviewed;
|
||||
- understood by future maintainers and coding agents;
|
||||
- executed in local and CI workflows;
|
||||
- diagnosed when it fails;
|
||||
- updated when legitimate behavior changes;
|
||||
- maintained as fixtures, APIs, and dependencies evolve; and
|
||||
- removed or rewritten when it becomes redundant, brittle, misleading, or obsolete.
|
||||
|
||||
Tests also create cognitive and architectural friction. They can constrain refactoring, duplicate policy, slow feedback loops, add noise to failures, and cause harmless implementation changes to require unrelated edits across the suite.
|
||||
Every test has an immediate and continuing cost: writing, review, execution,
|
||||
diagnosis, fixture maintenance, and updates when legitimate behavior changes.
|
||||
Tests can also constrain refactoring, duplicate policy, and add failure noise.
|
||||
|
||||
A test is warranted only when the confidence it provides justifies these costs.
|
||||
|
||||
Apply this cost-benefit analysis at two levels:
|
||||
Evaluate that tradeoff at two levels:
|
||||
|
||||
1. **Per test:** What realistic defect does this test detect, how consequential would that defect be, and is that protection worth the test's lifetime cost?
|
||||
2. **Across the suite:** Does this collection provide materially more confidence than a smaller, simpler suite would?
|
||||
|
||||
The preferred test suite is a **lean suite that provides sufficient confidence in the risks that matter, without redundant or low-value tests**. We seek sufficient confidence with the least unnecessary testing friction, not the fewest possible tests.
|
||||
Some friction is intentional. Tests should make dangerous changes—such as breaking compatibility, corrupting data, violating security boundaries, or reintroducing subtle bugs—require deliberate review. Keep ordinary internal changes inexpensive.
|
||||
|
||||
Some friction is intentional. Tests should make dangerous changes—such as breaking compatibility, corrupting data, violating security boundaries, or reintroducing subtle bugs—require deliberate review. They should not make ordinary internal changes needlessly expensive.
|
||||
|
||||
The cost of a test is not a reason to omit testing by default. Do not cite maintenance cost abstractly. When omitting a plausible test, be able to state why the protected failure is low-risk, already covered, obvious, reversible, or cheaper to detect elsewhere. For consequential, subtle, or difficult-to-observe behavior, the presumption should favor testing.
|
||||
Evaluate maintenance cost against the specific failure being protected. When omitting a plausible test, be able to state why the protected failure is low-risk, already covered, obvious, reversible, or cheaper to detect elsewhere. For consequential, subtle, or difficult-to-observe behavior, the presumption should favor testing.
|
||||
|
||||
## Default testing style
|
||||
|
||||
@@ -59,7 +48,7 @@ Control clocks, randomness, environment variables, and other process-global or m
|
||||
|
||||
## What deserves tests
|
||||
|
||||
Prioritize tests for:
|
||||
To the extent the following features are present in the application, prioritize tests for:
|
||||
|
||||
1. Public and package-level contracts.
|
||||
2. Domain rules and important invariants.
|
||||
@@ -69,15 +58,27 @@ Prioritize tests for:
|
||||
6. Previously observed or plausible regressions.
|
||||
7. Representative integration and end-to-end workflows.
|
||||
|
||||
A package-level contract is behavior relied upon by another package or major collaborator, not every observable detail of a package implementation.
|
||||
A package-level contract comprises behavior relied upon by another package or major collaborator.
|
||||
|
||||
For behavior involving **data integrity, destructive operations, compatibility, security, concurrency, idempotency, or recovery**, presume that durable tests are required unless the behavior is already credibly protected at another layer.
|
||||
Choose tests for requested behavior and established contracts. Tests must not
|
||||
introduce new restrictions, guarantees, or threat scenarios merely because they
|
||||
could be asserted. Follow the [agent policy](agents.md) when deciding whether a
|
||||
behavior belongs to the contract; current implementation behavior alone is not
|
||||
sufficient authority.
|
||||
|
||||
For established behavior involving **data integrity, destructive operations,
|
||||
compatibility, security, concurrency, idempotency, or recovery**, favor durable
|
||||
tests for realistic failures whose consequences warrant protection. Identify
|
||||
the failure and the existing contract it would violate. These categories call
|
||||
for attention, not an automatic test inventory or permission to strengthen the
|
||||
application's guarantees. Account for protection already provided at other layers.
|
||||
|
||||
Do not add tests merely because a function, branch, or line exists. Do not add a test when the same meaningful risk is already adequately protected elsewhere.
|
||||
|
||||
## Choose the right test boundary
|
||||
|
||||
Test through the narrowest stable boundary that expresses the behavior clearly.
|
||||
Choose the narrowest stable boundary that expresses the behavior clearly and
|
||||
provides durable confidence with minimal incidental coupling.
|
||||
|
||||
This is often the package API, but it may instead be:
|
||||
|
||||
@@ -85,28 +86,15 @@ This is often the package API, but it may instead be:
|
||||
- a package-level operation when several internal collaborators jointly produce the behavior; or
|
||||
- a larger integration boundary when correctness emerges from interaction with a real dependency.
|
||||
|
||||
Do not force all behavior through oversized end-to-end tests. Do not test every private helper merely because it exists. Choose the boundary that gives durable confidence with the least incidental coupling.
|
||||
|
||||
## Test behavior, not implementation
|
||||
|
||||
A test should protect a decision, contract, or invariant—not memorialize the current implementation.
|
||||
A test should protect a selected decision, contract, or invariant.
|
||||
|
||||
Before adding or retaining a test, ask:
|
||||
A test is suspect when it primarily detects changes to private constants or
|
||||
helpers, equivalent operation ordering, incidental formatting, equivalent
|
||||
algorithms, or internal structure that preserves behavior.
|
||||
|
||||
> What realistic defect would this test catch?
|
||||
|
||||
A test is suspect when its main purpose is to detect that someone:
|
||||
|
||||
- changed an internal constant;
|
||||
- renamed or split a private helper;
|
||||
- reordered equivalent internal operations;
|
||||
- changed incidental formatting;
|
||||
- replaced one correct algorithm with another; or
|
||||
- refactored internal object structure without changing behavior.
|
||||
|
||||
Refactoring should normally require no test edits unless the refactored structure is itself part of the contract.
|
||||
|
||||
A test can be factually correct and still have negative value. Accurately describing current behavior is not enough; the protected behavior must be important enough to justify the future friction.
|
||||
Behavioral tests should normally remain stable through internal refactoring that preserves the contract.
|
||||
|
||||
## Expected effects of different changes
|
||||
|
||||
@@ -123,12 +111,13 @@ A test failing is not the same as a test needing to be edited. Many tests may co
|
||||
|
||||
## Separate mechanism from policy
|
||||
|
||||
Configurable thresholds and defaults must not be duplicated throughout the test suite.
|
||||
Derive expectations from test-controlled configuration and relationships.
|
||||
|
||||
For example, do not encode an internal concurrency limit indirectly:
|
||||
For this example, assume the selected contract rejects a request to start more
|
||||
processes than a configured limit. Do not encode its production default indirectly:
|
||||
|
||||
```go
|
||||
// Production policy:
|
||||
// Production default:
|
||||
const maxConcurrency = 4
|
||||
|
||||
// Brittle test:
|
||||
@@ -146,25 +135,30 @@ require.NoError(t, runner.Start(limit))
|
||||
require.ErrorIs(t, runner.Start(limit+1), ErrTooMuchConcurrency)
|
||||
```
|
||||
|
||||
The test should prove:
|
||||
For this selected contract, the test should prove:
|
||||
|
||||
- the configured limit is accepted; and
|
||||
- one beyond the configured limit is rejected.
|
||||
|
||||
Rejection is not a general requirement for concurrency control. If the selected
|
||||
contract queues excess work or limits active workers while accepting larger
|
||||
batches, test that behavior instead. Do not add rejection or a configurable
|
||||
limit solely to reproduce this example.
|
||||
|
||||
The production default should be tested exactly only when its literal value is itself a public, operational, safety, protocol, or compatibility requirement.
|
||||
|
||||
Apply the same rule to limits, timeouts, capacities, retry counts, and ranges: test relationships and behavior, not duplicated literals.
|
||||
Apply the same rule to limits, timeouts, capacities, retry counts, and ranges: test relationships and behavior.
|
||||
|
||||
For concurrency limits, test both kinds of behavior when relevant:
|
||||
For established concurrency limits, distinguish these behaviors where the contract requires them:
|
||||
|
||||
1. **Configuration enforcement:** invalid or excessive requested values are handled correctly.
|
||||
1. **Configuration handling:** values are accepted or rejected according to the selected contract.
|
||||
2. **Runtime enforcement:** observed peak concurrency never exceeds the configured limit.
|
||||
|
||||
Use a test-controlled limit and measure the behavior relative to that limit. Do not merely assert today's default value.
|
||||
Use a test-controlled limit and measure the behavior relative to that limit.
|
||||
|
||||
## Avoid semantic duplication across layers
|
||||
## Assign each behavior a test owner
|
||||
|
||||
Each behavior should have a clear test owner.
|
||||
Where these layers exist, assign ownership as follows:
|
||||
|
||||
- Parser tests own parsing cases.
|
||||
- Validator tests own validation rules.
|
||||
@@ -174,9 +168,7 @@ Each behavior should have a clear test owner.
|
||||
- CLI tests own argument and configuration mapping.
|
||||
- End-to-end tests prove that representative assembled workflows work.
|
||||
|
||||
Higher-level tests should not repeat every lower-level case. A single intentional policy change should not require unrelated edits across many test files.
|
||||
|
||||
Tests that are individually reasonable may still be collectively redundant. Evaluate the marginal value of each additional test in light of the protection already provided by the rest of the suite.
|
||||
Give each layer its distinct responsibility and keep expectation updates localized to the contract being changed.
|
||||
|
||||
## Use test doubles deliberately
|
||||
|
||||
@@ -197,104 +189,76 @@ Mocks are appropriate when the contract includes facts such as:
|
||||
- an expensive API is called no more than once; or
|
||||
- a security audit event is emitted.
|
||||
|
||||
Do not use mocks merely to isolate every object or reproduce the implementation's call graph.
|
||||
|
||||
## Go-specific guidance
|
||||
|
||||
Use:
|
||||
Select techniques by behavior and risk:
|
||||
|
||||
- table-driven tests for meaningful behavioral categories and boundaries;
|
||||
- `t.TempDir()` for real filesystem behavior;
|
||||
- `httptest.Server` for realistic HTTP interactions;
|
||||
- fuzz tests for parsers, normalization, path handling, and broad input spaces;
|
||||
- fuzz tests when exploring broad input spaces, such as parsers or path handling, adds useful protection beyond representative cases;
|
||||
- golden files only when the complete output is intentionally stable;
|
||||
- integration tests where correctness depends on component interaction; and
|
||||
- a small number of representative end-to-end tests.
|
||||
- a small number of representative end-to-end tests when assembled workflows expose meaningful risks not adequately covered at narrower boundaries.
|
||||
|
||||
Avoid exact error-string assertions unless the wording is itself contractual. Prefer `errors.Is`, `errors.As`, typed errors, or structured error fields.
|
||||
Prefer `errors.Is`, `errors.As`, typed errors, or structured error fields. Use exact error-wording assertions only when the wording is contractual.
|
||||
|
||||
At CLI boundaries, prefer exit classifications, structured output, and the smallest stable semantic fragment needed to identify the error. Do not snapshot complete diagnostic wording unless it is contractual.
|
||||
At CLI boundaries, prefer exit classifications, structured output, and the smallest stable semantic fragment needed to identify the error. Use complete diagnostic snapshots only when the wording is contractual.
|
||||
|
||||
Golden-file updates must require an explicit local flag. CI must not update golden files automatically, and reviewers must inspect the semantic diff before accepting an update.
|
||||
|
||||
Keep tests readable and direct. Test helpers and fixture frameworks must earn their own maintenance cost; do not build elaborate test infrastructure for small or isolated needs.
|
||||
Keep tests readable and direct. Size test helpers and fixture frameworks to the maintenance benefit they provide.
|
||||
|
||||
## Coverage
|
||||
|
||||
Coverage is a diagnostic, not a target.
|
||||
|
||||
Use it to find untested critical branches and unexpectedly weak packages. Do not write low-value tests solely to increase a percentage, and do not infer test quality from coverage alone.
|
||||
Use coverage to locate untested critical branches and unexpectedly weak packages. Evaluate test quality through meaningful behavioral protection and choose coverage according to risk.
|
||||
|
||||
Pure domain logic will often warrant higher coverage than CLI wiring or external adapters. Uneven coverage is acceptable when it reflects risk.
|
||||
|
||||
Increasing coverage is valuable only when the newly covered behavior protects a meaningful risk at an acceptable cost.
|
||||
|
||||
## Regression tests
|
||||
|
||||
A bug fix should normally include a regression test that fails before the fix and passes afterward.
|
||||
|
||||
Retain the test when the defect could realistically recur and its consequences justify the ongoing cost. Prefer the narrowest durable test of the violated contract or invariant; do not preserve accidental implementation details from the original bug.
|
||||
Retain the test when the defect could realistically recur and its consequences justify the ongoing cost. Prefer the narrowest durable test of the violated contract or invariant.
|
||||
|
||||
Not every historical bug requires a permanent test. If the underlying design has made recurrence impossible, the test has become redundant, or a stronger invariant test now subsumes it, remove or consolidate it.
|
||||
Remove or consolidate a test when the underlying design has made recurrence impossible, its protection is redundant, or a stronger invariant test subsumes it.
|
||||
|
||||
## Deleting or rewriting tests
|
||||
|
||||
Tests are maintained code, not permanent historical artifacts.
|
||||
|
||||
Delete or rewrite a test when its maintenance cost exceeds the confidence it provides.
|
||||
Delete or rewrite tests when maintenance cost exceeds their continuing
|
||||
protective value.
|
||||
|
||||
Strong candidates include tests that:
|
||||
|
||||
- require updates after harmless internal changes;
|
||||
- directly assert private constants without protecting a real contract;
|
||||
- duplicate the same policy across several layers;
|
||||
- assert incidental private constants or snapshot large amounts of incidental output;
|
||||
- verify mock choreography rather than outcomes;
|
||||
- snapshot large amounts of incidental output;
|
||||
- test trivial private helpers already exercised through stable package behavior;
|
||||
- protect risks already covered more effectively elsewhere;
|
||||
- duplicate policy across layers, retest trivial helpers covered by package
|
||||
behavior, or protect risks covered more effectively elsewhere;
|
||||
- are flaky, misleading, obsolete, or disproportionately expensive to diagnose; or
|
||||
- no longer correspond to a plausible failure mode.
|
||||
|
||||
Several brittle tests may encode one genuine requirement. Replace them with one durable behavior-level or invariant test rather than preserving all of them.
|
||||
|
||||
Deleting a low-value test can improve the quality of the suite by reducing noise, maintenance burden, and friction around legitimate change.
|
||||
Several brittle tests may encode one genuine requirement. Consolidate them into one durable behavior-level or invariant test.
|
||||
|
||||
## Reviewing a proposed test
|
||||
|
||||
Use the following questions when the value, boundary, or durability of a proposed test is not self-evident. Significant test additions should be reviewable against them, but written answers are not required for every routine test.
|
||||
Use the following questions when a proposed test needs closer evaluation. Significant test additions should be reviewable against them; written answers are optional for routine tests.
|
||||
|
||||
1. What realistic defect would it catch?
|
||||
2. How likely is that defect?
|
||||
3. How consequential would it be?
|
||||
4. Is the behavior already protected elsewhere?
|
||||
5. At which layer should this behavior be owned?
|
||||
6. Does the test assert a durable contract or an incidental implementation detail?
|
||||
7. Could the implementation be refactored without changing the behavior and without editing this test?
|
||||
8. What should cause this test to fail?
|
||||
9. What legitimate changes should not cause this test to fail?
|
||||
10. What ongoing maintenance, execution, and diagnostic cost will the test impose?
|
||||
11. Is there a smaller or more direct test that protects the same risk?
|
||||
|
||||
Do not add the test when its expected lifetime cost exceeds its expected protective value.
|
||||
|
||||
When deciding not to test plausible behavior, record or be able to explain why the risk is low, already protected, obvious, reversible, or cheaper to detect elsewhere.
|
||||
1. Which requested behavior or established contract does it protect, and what realistic defect would violate it?
|
||||
2. How likely and consequential is that defect, and is it already protected elsewhere?
|
||||
3. What is the narrowest stable boundary that can test it clearly?
|
||||
4. Would a correct internal refactor or a change to an incidental default require test edits?
|
||||
5. Does its confidence justify its maintenance, execution, and diagnostic cost, or would a smaller test suffice?
|
||||
|
||||
## Definition of sufficient
|
||||
|
||||
A test suite is sufficient when:
|
||||
|
||||
- important contracts and invariants are protected;
|
||||
- meaningful boundaries and failure modes are exercised;
|
||||
- realistic and consequential regressions are credibly protected against silent recurrence;
|
||||
- behavior involving data integrity, destructive operations, compatibility, security, concurrency, idempotency, and recovery is credibly protected;
|
||||
- important external boundaries have realistic integration coverage;
|
||||
- representative complete workflows are tested;
|
||||
- failures provide useful signal rather than redundant noise;
|
||||
- legitimate internal changes usually do not require test edits; and
|
||||
- important requested behavior and established contracts are protected against realistic, consequential failures;
|
||||
- boundaries and component interactions have coverage where they introduce meaningful risks not protected elsewhere;
|
||||
- failures provide useful, distinct signals;
|
||||
- tests usually remain stable through legitimate internal changes; and
|
||||
- additional tests would mostly repeat existing protection or preserve inconsequential implementation details.
|
||||
|
||||
Sufficiency is a risk judgment, not a coverage percentage or test count. Reassess it as the application, its users, and the consequences of failure evolve.
|
||||
|
||||
The governing rule is:
|
||||
|
||||
> Test heavily where failure is consequential, subtle, or difficult to detect after the fact. Test lightly where failure is obvious, reversible, and inexpensive—and retain no test whose lifetime cost exceeds the confidence it provides.
|
||||
Reassess sufficiency as the application, its users, and the consequences of
|
||||
failure evolve.
|
||||
|
||||
217
docs/release.md
217
docs/release.md
@@ -1,167 +1,114 @@
|
||||
# Releasing Narratio
|
||||
|
||||
This is the maintainer runbook for the [Release Policy](policy/release.md).
|
||||
Its [explicit exceptions](policy/release.md#policy-exceptions) preserve the
|
||||
successful tag push as the automated responsibility boundary. Binary publication
|
||||
is asynchronous; later consumer-facing inspection is optional.
|
||||
The source release completes when the intended tag is successfully pushed to
|
||||
`origin`; binary delivery is a separate asynchronous status.
|
||||
|
||||
## Prerequisites and publication scope
|
||||
## Prepare the candidate
|
||||
|
||||
Use a checkout on `main` with Git authentication permitting fetches and pushes
|
||||
to `origin`, the authoritative Git remote. Install Git, a POSIX shell, standard
|
||||
Unix build tools, and the Go toolchain below. Make required modules available
|
||||
before offline validation. No model/provider credentials are needed. Gitea
|
||||
publication credentials belong to CI's secret store, not the local command.
|
||||
Use `main` and the authoritative Git remote `origin`. Install Git, a POSIX
|
||||
shell, standard Unix build tools, and Go 1.26. Have the selected Go modules
|
||||
available before offline validation. Git access must permit fetch and tag push.
|
||||
Application-provider credentials are not required; Gitea delivery credentials
|
||||
belong to CI.
|
||||
|
||||
Synchronous guards inspect local tags and `origin`, not every configured remote
|
||||
or Gitea release entry. Do not select a version known to have been published in
|
||||
any channel, even if these guards cannot see it.
|
||||
Choose an unused stable `vMAJOR.MINOR.PATCH` under the
|
||||
[compatibility rules](policy/release.md#versioning-and-compatibility). Narratio
|
||||
is past v1.0.0, so intentional CLI or configuration breaks require a major
|
||||
release. Update affected canonical documentation with the change. Write the
|
||||
matching `docs/releases/vMAJOR.MINOR.PATCH.md` with a short summary and any
|
||||
relevant compatibility impact or upgrade action; choose sections to suit the
|
||||
release.
|
||||
|
||||
## Go prerequisite
|
||||
End that checked-in note with these three links, replacing the version in
|
||||
each URL with the intended tag. The tag need not exist remotely yet. Check that
|
||||
`COPYRIGHT`, `LICENSE`, and `docs/oss/attribution.md` are present in the
|
||||
candidate. The tag CI reuses the checked-in note as the hosted release body.
|
||||
|
||||
Release preparation requires the maintained Go 1.26 baseline. Tag CI currently
|
||||
uses the explicitly pinned `golang:1.26.7` image for validation and asset builds.
|
||||
That asynchronous work does not change the tag-push completion boundary.
|
||||
```markdown
|
||||
[COPYRIGHT](https://gitea.maximumdirect.net/eric/narratio/src/tag/vMAJOR.MINOR.PATCH/COPYRIGHT) | [LICENSE](https://gitea.maximumdirect.net/eric/narratio/src/tag/vMAJOR.MINOR.PATCH/LICENSE) | [ATTRIBUTION](https://gitea.maximumdirect.net/eric/narratio/src/tag/vMAJOR.MINOR.PATCH/docs/oss/attribution.md)
|
||||
```
|
||||
|
||||
## Choose a version and write its note
|
||||
|
||||
Select an unused stable version under the
|
||||
[versioning rules](policy/release.md#versioning-and-compatibility). Narratio is
|
||||
past v1.0.0; intentional CLI/configuration breaks require a major release.
|
||||
|
||||
Create `docs/releases/vMAJOR.MINOR.PATCH.md` using the
|
||||
[required note structure](policy/release.md#release-documentation).
|
||||
Describe CLI, configuration, artifact, integration, and operating-contract
|
||||
changes, and the required operator action. Link to current canonical
|
||||
documentation for exact behavior.
|
||||
|
||||
## Prepare and record the candidate
|
||||
|
||||
Before committing, perform these manual reviews in addition to automated checks:
|
||||
|
||||
- Confirm compatibility/version selection and update affected canonical
|
||||
documentation and maintained examples.
|
||||
- Remove completed roadmap documents covering work included in this release;
|
||||
retain pending work. Their history remains in Git. Do not delete historical
|
||||
release notes.
|
||||
- Review the diff, staged changes, and untracked files for credentials, private
|
||||
data, generated output, unintended files, and unrelated changes.
|
||||
- Review changed documentation links and behavior-bearing commands. Automated
|
||||
link checks supplement rather than replace review.
|
||||
|
||||
Commit the note and candidate changes, then push that commit to `main` through
|
||||
the ordinary development workflow. Record the exact candidate:
|
||||
Retire completed roadmaps included in the release while preserving planned or
|
||||
deferred work and repairing affected links. Review the change through the
|
||||
ordinary development workflow for unintended files, credentials, private data,
|
||||
and documentation accuracy. Commit and push the candidate to `origin/main`
|
||||
before tagging; record its exact commit if needed:
|
||||
|
||||
```sh
|
||||
git rev-parse HEAD
|
||||
```
|
||||
|
||||
Do not create a tag until `origin/main` points to that same commit. If the
|
||||
candidate changes, repeat the reviews and validation.
|
||||
## Publish
|
||||
|
||||
## Validate the candidate
|
||||
|
||||
From the repository root, run:
|
||||
From a clean `main` checkout at the pushed candidate, run one command:
|
||||
|
||||
```sh
|
||||
scripts/check-release-candidate.sh vMAJOR.MINOR.PATCH
|
||||
scripts/release.sh vMAJOR.MINOR.PATCH
|
||||
```
|
||||
|
||||
The script also works when invoked by its absolute path from another directory.
|
||||
It validates the version and matching note, module hygiene, formatting,
|
||||
whitespace, uncached tests, race tests, static checks, documentation, examples,
|
||||
and three cross-build assets. It uses `GOWORK=off`, does not contact application
|
||||
services, CI, or Gitea, and does not create tags or modify tracked source.
|
||||
Fix failures on `main`, commit, push normally, and rerun validation.
|
||||
It fetches `origin/main` and tags; requires local `HEAD` to equal
|
||||
`origin/main`; checks the committed note and unused version; runs the
|
||||
candidate checker **once**; then repeats cheap mutable-state guards before
|
||||
creating an unsigned lightweight tag at the recorded commit. It verifies the
|
||||
tag target and pushes only
|
||||
`refs/tags/vMAJOR.MINOR.PATCH:refs/tags/vMAJOR.MINOR.PATCH`. It does not
|
||||
commit, push `main`, force updates, or publish all tags.
|
||||
|
||||
The macOS cross-build proves compilation, not native runtime behavior.
|
||||
The checker runs `go mod tidy -diff`, tracked Go formatting and diff whitespace
|
||||
checks, one `go test -mod=readonly -race -count=1 ./...` full suite, and
|
||||
`go vet -mod=readonly ./...`. Its asset builder cross-builds Linux amd64,
|
||||
Linux arm64, and best-effort macOS arm64, then checks the embedded version
|
||||
on a host binary. The macOS cross-build proves compilation, not native
|
||||
runtime behavior. Owned Go commands run with `GOWORK=off`; tests, vet, and
|
||||
builds use readonly module mode. The deterministic suite includes documentation
|
||||
and maintained-example checks. The command does not contact application
|
||||
services or Gitea and does not wait for CI.
|
||||
|
||||
## Declared deliverables and automation
|
||||
A successful tag push is the source-release completion point. The command
|
||||
prints the tag and commit and exits without a separate network read-back.
|
||||
For optional diagnosis before publication, run
|
||||
`scripts/check-release-candidate.sh vMAJOR.MINOR.PATCH`; publication will
|
||||
validate the candidate again, so this is not a required preparation step.
|
||||
|
||||
The source release is the exact version tag at the validated commit.
|
||||
The tag-triggered `.woodpecker/release.yml` validates the tagged source,
|
||||
runs `scripts/build-release-assets.sh`, and publishes these Gitea assets:
|
||||
## Artifact delivery
|
||||
|
||||
Tag-triggered `.woodpecker/release.yml` independently validates the tagged
|
||||
source, builds the same three targets, and publishes these Gitea downloads:
|
||||
|
||||
- `narratio-vMAJOR.MINOR.PATCH-linux-amd64`
|
||||
- `narratio-vMAJOR.MINOR.PATCH-linux-arm64`
|
||||
- `narratio-vMAJOR.MINOR.PATCH-darwin-arm64` (best effort)
|
||||
- `SHA256SUMS`
|
||||
|
||||
The builder embeds the version, disables ambient Go workspaces, and checks a
|
||||
host binary's `version` output. The release publisher uses the matching
|
||||
checked-in note and generates SHA-256 checksums. Existing files are skipped and
|
||||
overwrite is disabled. No image or package-registry deliverable is declared.
|
||||
CI does not choose versions, modify source candidates, or move tags.
|
||||
The builder embeds the tag version and checks host `version` output. CI
|
||||
generates checksums and uses non-overwriting publication settings. It does
|
||||
not select versions, change the source, or move tags. No image or package
|
||||
registry output is declared. Tag publication is not proof that these
|
||||
asynchronous downloads are available.
|
||||
|
||||
## Publish the tag
|
||||
## Failure and recovery
|
||||
|
||||
From a clean checkout on `main` whose `HEAD` equals `origin/main`, run:
|
||||
If validation fails before tagging, correct and commit the candidate, push
|
||||
it to `main`, and rerun the publication command. If the tag push reports
|
||||
failure, its outcome may be ambiguous: keep the local tag and inspect the
|
||||
exact `refs/tags/vMAJOR.MINOR.PATCH` at `origin` before declaring success
|
||||
or retrying. A reachable matching remote tag at the recorded commit establishes
|
||||
publication; a confirmed absent tag permits investigation of the transport
|
||||
failure. If `origin` cannot be inspected, publication status is unknown.
|
||||
Do not move, overwrite, or automatically retry the tag. Remove a local tag
|
||||
only after confirming it was never published or used by a release channel.
|
||||
|
||||
```sh
|
||||
scripts/release.sh vMAJOR.MINOR.PATCH
|
||||
```
|
||||
A transient CI or delivery failure can be retried from the same immutable
|
||||
tag. Missing assets may be added later if they match the tagged source and
|
||||
any published checksum manifest; do not overwrite existing binaries,
|
||||
checksums, or release-note contents. A source/content defect, or delivery
|
||||
that cannot be corrected without replacement, requires a new suitable
|
||||
version and matching note. Leave the original release intact.
|
||||
|
||||
The command fetches and checks `origin/main`, re-runs candidate validation,
|
||||
then fetches and checks again before creating an explicitly unsigned lightweight
|
||||
tag for the originally recorded commit. It refuses dirty, divergent, changed,
|
||||
or already-tagged candidates. It verifies the local tag target and pushes only:
|
||||
|
||||
```text
|
||||
refs/tags/vMAJOR.MINOR.PATCH:refs/tags/vMAJOR.MINOR.PATCH
|
||||
```
|
||||
|
||||
It never commits changes, pushes `main`, force-pushes, moves tags, or pushes all
|
||||
tags. Successful publication of that ref completes the command; it prints the
|
||||
tag and commit and returns without waiting for CI, querying Gitea, downloading
|
||||
assets, or checking checksums.
|
||||
|
||||
## Failure handling
|
||||
|
||||
Before tag creation, correct the candidate on `main` and repeat validation.
|
||||
If a push fails after local tag creation, the local tag is retained for inspection.
|
||||
Do not retry blindly or assume the remote received nothing: a connection failure
|
||||
can leave publication uncertain. Inspect the exact remote ref before taking any
|
||||
local-tag cleanup action. This is recovery from a failed command, not a
|
||||
post-success publication gate.
|
||||
|
||||
After publication, follow the
|
||||
[immutability and correction rules](policy/release.md#immutability-and-correction).
|
||||
Correct defects or failed asynchronous publication with a new semantically
|
||||
appropriate version, matching note, and the complete procedure. Never replace
|
||||
existing tagged assets in place.
|
||||
|
||||
## Optional asynchronous inspection
|
||||
|
||||
A human may later inspect the tag-triggered Woodpecker job and Gitea release.
|
||||
This is optional follow-up, never part of the automated releaser's completion
|
||||
criteria. Do not wait for or poll CI/Gitea from the release command.
|
||||
|
||||
For optional source verification, substitute the released version below and
|
||||
compare the remote target to the recorded candidate hash:
|
||||
|
||||
```sh
|
||||
git ls-remote --tags origin refs/tags/vMAJOR.MINOR.PATCH
|
||||
git rev-parse 'refs/tags/vMAJOR.MINOR.PATCH^{commit}'
|
||||
```
|
||||
|
||||
Download the three named binaries and `SHA256SUMS` from the matching Gitea release
|
||||
into an empty inspection directory. In that directory, verify on Linux:
|
||||
|
||||
```sh
|
||||
sha256sum --check SHA256SUMS
|
||||
```
|
||||
|
||||
On macOS, use `shasum -a 256 --check SHA256SUMS`. After successful verification,
|
||||
make the matching host binary executable and run its version command, for example
|
||||
on Linux amd64 (replace the version in both commands):
|
||||
|
||||
```sh
|
||||
chmod +x ./narratio-vMAJOR.MINOR.PATCH-linux-amd64
|
||||
./narratio-vMAJOR.MINOR.PATCH-linux-amd64 version
|
||||
```
|
||||
|
||||
Expected output is `narratio vMAJOR.MINOR.PATCH`. Use only the matching architecture
|
||||
on other supported hosts. Checksums establish consistency with the downloaded
|
||||
checksum file, not a new signature or independent authenticity guarantee.
|
||||
Missing assets are an asynchronous publication problem, not grounds to move or
|
||||
reuse the successfully published source tag.
|
||||
Optional consumer inspection may compare the tag's remote commit with the
|
||||
recorded candidate, check the Woodpecker delivery job and hosted Gitea note,
|
||||
download the assets into an empty directory, run `sha256sum --check
|
||||
SHA256SUMS` (or `shasum -a 256 --check SHA256SUMS` on macOS), and run
|
||||
the matching host binary's `version` command. This is separate delivery
|
||||
observation, never a source-release gate.
|
||||
|
||||
@@ -1,27 +1,22 @@
|
||||
# Release Notes
|
||||
|
||||
This directory contains immutable historical release notes for Narratio.
|
||||
Future notes are created with the matching stable version and use this minimum
|
||||
structure:
|
||||
|
||||
```markdown
|
||||
# Narratio vMAJOR.MINOR.PATCH
|
||||
|
||||
This release ...
|
||||
|
||||
## Summary
|
||||
|
||||
## Compatibility
|
||||
|
||||
## Upgrade
|
||||
|
||||
## Changes
|
||||
```
|
||||
Future notes use the matching stable version and begin with
|
||||
`# Narratio vMAJOR.MINOR.PATCH`. Include a short summary and relevant
|
||||
compatibility or upgrade guidance; choose sections suited to the release.
|
||||
End each new note with the three immutable-tag notice links specified in the
|
||||
[release procedure](../release.md).
|
||||
|
||||
See the [release procedure](../release.md) for creating a candidate and tag.
|
||||
When asynchronous publication succeeds, the corresponding Gitea release is the
|
||||
canonical source for downloadable binaries and checksums.
|
||||
|
||||
- [v3.0.0](v3.0.0.md)
|
||||
- [v2.2.1](v2.2.1.md)
|
||||
- [v2.2.0](v2.2.0.md)
|
||||
- [v2.1.2](v2.1.2.md)
|
||||
- [v2.1.1](v2.1.1.md)
|
||||
- [v2.1.0](v2.1.0.md)
|
||||
- [v2.0.0](v2.0.0.md)
|
||||
- [v1.7.0](v1.7.0.md)
|
||||
- [v1.6.0](v1.6.0.md)
|
||||
|
||||
57
docs/releases/v3.0.0.md
Normal file
57
docs/releases/v3.0.0.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Narratio v3.0.0
|
||||
|
||||
This major release moves Narratio pipeline selection to ConfigKit overlays and
|
||||
updates its Audita and Notarius integration contracts. Existing deployments
|
||||
must migrate configuration before running affected sessions.
|
||||
|
||||
## Compatibility and upgrade
|
||||
|
||||
- Replace Narratio's `--profile <name>` with `--overlay <name>` and move selected
|
||||
`profiles/<name>.yml` files to `overlays/<name>.yml` beside the pipeline root.
|
||||
The old flag and selected directory are no longer supported; explicit imports
|
||||
from a directory named `profiles` remain valid. Update `config diff` positional
|
||||
selections accordingly. See [configuration](../config.md#pipeline-imports-and-overlays)
|
||||
and the [CLI reference](../cli.md).
|
||||
- Before opening a session manifest containing
|
||||
`effective_config.selected_profile`, back it up and follow the
|
||||
[manifest migration procedure](../operations.md#migrating-manifest-overlay-provenance).
|
||||
Strict decoding rejects the retired field. Preserve the manifest's stage and
|
||||
checkpoint state; this informational rename does not itself require rerunning
|
||||
every stage. Immutable remote snapshots are not edited in place.
|
||||
- Deploy an Audita v2 executable and migrate its configuration before running
|
||||
`polish`. Narratio no longer generates an Audita config or accepts the old
|
||||
endpoint, model, concurrency, singular API-key, report, and retention fields.
|
||||
Audita now owns backends, PromptKit profiles, reporting, and debug settings;
|
||||
Narratio accepts optional downstream selectors and forwards only names listed
|
||||
in `pipeline.audita.credentials`. Follow the
|
||||
[Audita migration table](../operations.md#migrating-audita-and-provider-credentials)
|
||||
and [integration contract](../integrations/audita.md).
|
||||
- Replace `pipeline.notarius.llm_api_key` with the
|
||||
`pipeline.notarius.credentials` list. Rename
|
||||
`pipeline.notarius.config_profile` to `config_overlay` and move selected
|
||||
downstream Notarius files to its `overlays/` directory. The old fields have
|
||||
no compatibility aliases. A named downstream overlay requires a compatible
|
||||
Notarius executable; v0.8.1 is the tested baseline, while deployments that
|
||||
omit the selector gain no new version requirement. See the
|
||||
[Notarius configuration reference](../config.md#notarius-configuration-overlay)
|
||||
and [integration contract](../integrations/notarius.md).
|
||||
|
||||
## Changes
|
||||
|
||||
- Narratio and downstream overlay names are independent. Operators can select
|
||||
separate Audita and Notarius overlays from one Narratio overlay without
|
||||
implicit name forwarding. ConfigKit is updated to v0.4.2.
|
||||
- Audita's corrected transcript remains the canonical polish output. Available
|
||||
`errors.yml`, `recoveries.yml`, and `report.md` files are retained as bounded
|
||||
diagnostics; missing reports are allowed, and an exit-zero valid transcript
|
||||
succeeds even when reports describe recoverable errors or no corrections.
|
||||
- Audita and Notarius credential lists resolve at pipeline load and forward
|
||||
captured values under their exact names, with captured subprocess output and
|
||||
failure diagnostics redacted. Narratio does not discover backend credentials
|
||||
from downstream configuration; operators must list the names those tools need.
|
||||
- Repository policy, license/attribution notices, release validation, and the
|
||||
asynchronous artifact-delivery procedure are aligned with the current
|
||||
[release runbook](../release.md). Completed implementation roadmaps have been
|
||||
retired from the candidate source.
|
||||
|
||||
[COPYRIGHT](https://gitea.maximumdirect.net/eric/narratio/src/tag/v3.0.0/COPYRIGHT) | [LICENSE](https://gitea.maximumdirect.net/eric/narratio/src/tag/v3.0.0/LICENSE) | [ATTRIBUTION](https://gitea.maximumdirect.net/eric/narratio/src/tag/v3.0.0/docs/oss/attribution.md)
|
||||
@@ -1,288 +0,0 @@
|
||||
# Adopt Audita v2 and ConfigKit v0.4.0
|
||||
|
||||
Status: implemented (2026-09-25); release pending.
|
||||
|
||||
## Goal
|
||||
|
||||
Migrate Narratio's `polish` integration from Audita's former command/configuration
|
||||
contract to Audita v2.0.0. Keep Narratio responsible for orchestration and Audita
|
||||
responsible for correction behavior and LLM execution configuration.
|
||||
|
||||
Adopt a consistent provider-named credential list for both Audita and Notarius,
|
||||
so operators define each secret once and explicitly share it with the downstream
|
||||
applications that need it. This is a clean cutover without backward-compatibility
|
||||
shims.
|
||||
|
||||
Adopt ConfigKit v0.4.0 and use “overlay” consistently for Narratio's selected
|
||||
pipeline configuration, distinct from downstream LLM model profiles.
|
||||
|
||||
Production runs use Audita's default reporting configuration: Narratio passes
|
||||
neither `--debug` nor `--reporting=false`. Normal reports remain available without
|
||||
enabling debug diagnostics. Adding debug reporting through Narratio's testing
|
||||
profile is deferred.
|
||||
|
||||
This document defines the intended end state, migration scope, and policy.
|
||||
The [implementation plan](implementation.md) owns implementation sequencing and
|
||||
verification steps.
|
||||
|
||||
## Baseline and upstream contract
|
||||
|
||||
The baseline is Narratio v2.2.1 and the Audita checkout tagged v2.0.0. Upstream
|
||||
references are Audita's `docs/migrations/v2.md`, `docs/cli.md`,
|
||||
`docs/integrations/subprocess.md`, and `docs/integrations/output-files.md`,
|
||||
available in the sibling `../audita/` checkout. Narratio's current contract is
|
||||
documented in [Integration: Audita](../integrations/audita.md).
|
||||
|
||||
The current integration is not compatible with Audita v2:
|
||||
|
||||
- It requests `--report-json` by default; that flag has been removed.
|
||||
- It can pass retired endpoint, model, concurrency, and work-directory-retention
|
||||
flags.
|
||||
- It expects one JSON report instead of the normal v2 report bundle.
|
||||
- Its single forwarded `AUDITA_LLM_API_KEY` has no implicit meaning in v2;
|
||||
an Audita backend must explicitly reference that environment variable.
|
||||
- Its semantic fingerprint sorts modules, although Audita treats module order
|
||||
and repetitions as meaningful.
|
||||
|
||||
Audita v2 requires a version-2 configuration file. An explicit `--config` selects
|
||||
one; otherwise Audita performs its own documented discovery. Backend definitions
|
||||
own endpoints, credentials, and capacity. PromptKit profiles own models and
|
||||
per-attempt controls. Audita owns retry/repair policy and operation deadlines.
|
||||
Narratio's generated invocation YAML is a diagnostic record, not a substitute
|
||||
for that Audita configuration file.
|
||||
|
||||
## Target architecture
|
||||
|
||||
Retain the existing subprocess boundary and `polish` stage. Do not introduce a
|
||||
second correction engine, an in-process Audita dependency, or a generic external
|
||||
tool configuration framework.
|
||||
|
||||
Narratio owns:
|
||||
|
||||
- Selection of the executable and the overall invocation timeout/cancellation.
|
||||
- Transcript and glossary inputs, run-local output placement, validation of the
|
||||
corrected transcript, and promotion to the existing polished transcript
|
||||
identity.
|
||||
- Explicit configuration/profile selections and supported domain overrides.
|
||||
- Deliberate credential forwarding, secret-safe invocation diagnostics, and
|
||||
manifest references to results and reports.
|
||||
- Existing stage completion, resume, force, publish, restore, and cleanup
|
||||
behavior.
|
||||
|
||||
Audita owns its configuration schema and discovery, backend/model configuration,
|
||||
provider execution, correction sequence, recovery behavior, and report contents.
|
||||
Narratio does not translate old settings into a generated v2 configuration or
|
||||
duplicate Audita's complete validation logic.
|
||||
|
||||
## Configuration and invocation migration
|
||||
|
||||
### ConfigKit and pipeline overlays
|
||||
|
||||
Upgrade Narratio's ConfigKit dependency from v0.3.1 to v0.4.0. ConfigKit's
|
||||
selected-configuration terminology changes from profile to overlay: the Go API
|
||||
uses `Options.Overlay`, `LayerOverlay`, and `CodeOverlay*`; source layers and
|
||||
diagnostic codes use `overlay` and `overlay.*`. Composition, precedence, secret
|
||||
resolution, and lifecycle semantics otherwise remain unchanged.
|
||||
|
||||
Narratio's pipeline-selection interface becomes `--overlay`, selecting
|
||||
`overlays/<name>.yml` beside the root pipeline file. Remove `--profile` and old
|
||||
selected-directory discovery without aliases or fallbacks. Preserve existing
|
||||
base selection for omission, explicit empty selection, and `default`.
|
||||
Configuration inspection, diff descriptions, internal selection names, and
|
||||
newly written selection provenance use overlay terminology as well.
|
||||
|
||||
Maintain existing value-based digest and stage-reuse semantics; renaming
|
||||
informational selection provenance is not a reason to invalidate completed
|
||||
work or automatically rewrite historical manifests. Strict manifest decoding
|
||||
rejects retired provenance fields; operators must deliberately migrate that
|
||||
informational member on a backed-up manifest, preserving execution/checkpoint
|
||||
state. Update maintained examples and operator migration guidance for the
|
||||
directory, flag, and provenance changes.
|
||||
|
||||
This rename does not apply to downstream model profiles, Scriptorium
|
||||
`profile_id`, Audita's proposal/validation profiles, or Notarius's
|
||||
`config_profile`. Nor does it prohibit ordinary explicit imports from a directory
|
||||
named `profiles`. Narratio overlays do not automatically select downstream
|
||||
overlays or profiles. These are independently owned choices.
|
||||
|
||||
### Audita v2 configuration
|
||||
|
||||
Keep binary, timeout, explicit config-path selection, and surviving explicit
|
||||
domain overrides such as transcript description, output schema, and modules.
|
||||
Allow Audita's native configuration discovery when no config path is selected;
|
||||
do not impose an additional requirement to supply an explicit path.
|
||||
|
||||
Provide optional Audita overlay, proposal-profile, and validation-profile
|
||||
selectors, passed through to their corresponding CLI flags. Omission leaves
|
||||
Audita's own defaults and validation-profile inheritance in control. These are
|
||||
Audita selectors, not automatic translations of Narratio overlay names.
|
||||
|
||||
Retire the Narratio settings that mirror removed Audita endpoint/model/capacity
|
||||
flags and work-directory retention. Move their operational meaning into the
|
||||
operator-maintained Audita configuration and profiles. Remove stale adapter
|
||||
fields, validation, invocation metadata, examples, and tests along with them.
|
||||
Remove the old report toggle and both adapters' singular `llm_api_key` fields
|
||||
from accepted Narratio configuration. Do not retain deprecated aliases,
|
||||
automatic conversion, ignored fields, or a v1 execution path. Existing strict
|
||||
configuration decoding rejects removed fields. Provide migration guidance and a
|
||||
release compatibility notice rather than runtime compatibility machinery.
|
||||
|
||||
Preserve the distinction between omitted modules and an explicitly empty module
|
||||
list: omission requests Audita's configured/default sequence; an empty list
|
||||
requests no correction modules. Preserve order and repetitions rather than
|
||||
sorting or deduplicating. Do not broaden this into a change to unrelated
|
||||
adapters' module semantics.
|
||||
|
||||
Normal invocations no longer pass `--report-json`, `--work-dir-retention`, or
|
||||
debug-work-directory flags as a way to obtain reports. They need no reporting
|
||||
override: Audita writes its ordinary report bundle by default. The old
|
||||
Narratio `report` toggle must not silently become `--reporting=false`.
|
||||
|
||||
The production Audita configuration must also retain reporting enabled and debug
|
||||
disabled. Omitting CLI flags does not override an operator's explicit external
|
||||
configuration. Document this distinction rather than silently adding forced
|
||||
boolean overrides or rejecting otherwise valid Audita configuration.
|
||||
|
||||
## Credentials
|
||||
|
||||
Define secrets once under provider-oriented environment-variable names, such as
|
||||
`OPENROUTER_API_KEY` and `RAKESTRAWHOME_API_KEY`, through the process environment
|
||||
or Narratio's existing secrets-directory bootstrap. These names are examples,
|
||||
not a fixed provider registry; application-specific names are not required.
|
||||
|
||||
Add `pipeline.audita.credentials` and `pipeline.notarius.credentials` as lists
|
||||
of Narratio typed secret references. Each entry names the environment variable
|
||||
whose captured value is forwarded under that exact name. Omission or an empty
|
||||
list forwards no credentials. The same reference may appear in both adapters'
|
||||
lists without duplicating its stored secret value. An illustrative configuration
|
||||
fragment is:
|
||||
|
||||
```yaml
|
||||
pipeline:
|
||||
audita:
|
||||
credentials:
|
||||
- OPENROUTER_API_KEY
|
||||
- RAKESTRAWHOME_API_KEY
|
||||
notarius:
|
||||
credentials:
|
||||
- OPENROUTER_API_KEY
|
||||
```
|
||||
|
||||
Resolve references through the existing configuration/secret-loading mechanism
|
||||
before adapter execution, preserving its nonempty-value requirement. Forward
|
||||
the captured values rather than rereading the parent environment during a run.
|
||||
Retain the minimal child execution environment plus each adapter's explicit
|
||||
credential list; do not forward every secret found during bootstrap.
|
||||
|
||||
Audita backends select these names through `credential`; the current Notarius
|
||||
PromptKit profiles select them through `api_key_env`. Narratio neither inspects
|
||||
downstream configuration to infer required credentials nor translates names,
|
||||
registers providers, or duplicates backend configuration. Audita resolves
|
||||
credentials for every surviving configured backend, even one not selected by
|
||||
a profile, so its list must cover all those references.
|
||||
|
||||
Generalize Notarius's current single-name forwarding and replace Audita's fixed
|
||||
`AUDITA_LLM_API_KEY` destination with this shared convention. Use existing shared
|
||||
secret and subprocess facilities, extending narrow helpers where needed rather
|
||||
than introducing a new secret-management framework. Register every forwarded
|
||||
credential with captured-output redaction, including custom names and multiple
|
||||
keys. Values must not enter arguments, generated configuration, manifests,
|
||||
logs, or examples. As today, downstream tools remain responsible for files they
|
||||
write directly; this does not add arbitrary downstream-file scanning.
|
||||
|
||||
## Ordinary reports and result handling
|
||||
|
||||
Replace the old `audita.report.json` handling with Audita's normal `errors.yml`,
|
||||
`recoveries.yml`, and `report.md` bundle. With a file output, Audita writes these
|
||||
beside the corrected transcript; an arbitrary report destination is not supplied
|
||||
through the removed report flag.
|
||||
|
||||
Discover the reports at their defined run-local locations and retain them as
|
||||
diagnostics using Narratio's existing manifest and diagnostic lifecycle. Keep
|
||||
them distinguishable from the canonical polished transcript. Adapt report
|
||||
references, publication/restore coverage, and operator inspection guidance so
|
||||
the bundle is not lost or confused with an older run's JSON report. Do not
|
||||
fabricate a legacy JSON report or delete historical diagnostics as part of the
|
||||
migration.
|
||||
|
||||
Retain existing bounded, confined file handling. Replace JSON-specific report
|
||||
handling with only the validation needed for consuming the v2 bundle; do not
|
||||
introduce a second comprehensive report-schema validator or make incidental
|
||||
Markdown wording a contract. Report locations must be discoverable without
|
||||
parsing human-readable stderr. Detailed report-counter ingestion is not required
|
||||
for this migration.
|
||||
|
||||
Audita's exit status remains authoritative. Exit zero with a valid corrected
|
||||
transcript may include recoverable LLM failures, including a normalized result
|
||||
with no model corrections. Preserve the reports so operators can assess that
|
||||
outcome; do not add an unrequested fail-on-recovery or minimum-correction policy.
|
||||
|
||||
Conversely, a nonzero exit must fail polish even if a transcript file exists:
|
||||
Audita can fail while writing required reports after writing the transcript.
|
||||
Preserve available failure diagnostics without requiring early failures to have
|
||||
produced a complete report bundle. Failed output must not become the canonical
|
||||
successful result.
|
||||
|
||||
## Resume and semantic evidence
|
||||
|
||||
Update polish's semantic evidence for the new result-affecting selections and
|
||||
remove retired endpoint/model fields. Include explicit config/overlay/profile
|
||||
selection and preserve ordered module semantics, including omitted versus empty
|
||||
selection. Version the changed evidence so incompatible older evidence is not
|
||||
mistaken for a valid match when polish is considered for reuse.
|
||||
|
||||
Keep the existing boundary for opaque downstream configuration: Narratio does
|
||||
not recursively hash Audita configuration, overlays, and profile contents.
|
||||
Operators force polish when changing contents behind unchanged selectors.
|
||||
Timeouts, credential values, reporting details, and other execution-only settings
|
||||
must not become blanket semantic invalidation keys. Do not rerun unrelated or
|
||||
unselected stages merely because the integration was upgraded.
|
||||
|
||||
## Migration guidance and verification
|
||||
|
||||
Update the canonical [configuration reference](../config.md),
|
||||
[Audita integration contract](../integrations/audita.md),
|
||||
[Notarius integration contract](../integrations/notarius.md),
|
||||
[polish internals](../internal/stage-polish.md), maintained examples, and relevant
|
||||
operations/troubleshooting guidance when implementation lands. Cover:
|
||||
|
||||
- Moving selected Narratio pipeline files to `overlays/`, replacing `--profile`
|
||||
with `--overlay`, and distinguishing configuration overlays from model profiles.
|
||||
- Updating ConfigKit API/source attribution and verifying unchanged effective
|
||||
values retain existing semantic reuse behavior.
|
||||
- Preparing and validating an Audita v2 configuration and its profiles before
|
||||
switching the executable; copying an old v1 configuration is insufficient.
|
||||
- Moving endpoint, model, capacity, and credential selections to their v2 owners.
|
||||
- Replacing both singular `llm_api_key` settings with explicit `credentials`
|
||||
lists, storing each provider key once, and matching downstream credential
|
||||
references to those names. State clearly that old fields are removed.
|
||||
- Using normal reports to inspect recoveries and failures without debug mode.
|
||||
- Force/resume expectations and the treatment of existing completed sessions.
|
||||
- The explicitly deferred nature of Narratio testing-profile debug support.
|
||||
|
||||
Verification should exercise the real adapter boundary with offline subprocess
|
||||
fixtures and focused stage/configuration tests: accepted v2 arguments, omitted
|
||||
defaults, ordered/empty modules, secret-safe forwarding, successful report
|
||||
capture, recoverable-error success, nonzero exit with an existing transcript,
|
||||
failure diagnostics, and semantic reuse/invalidation. Update existing behavioral
|
||||
tests rather than retaining assertions for removed flags or exact stderr prose.
|
||||
Where practical, verify invocation against the tagged Audita CLI without live
|
||||
provider calls. Follow the repository's testing and documentation policies.
|
||||
|
||||
Credential tests must cover both adapters, multiple custom names, reuse of one
|
||||
secret by both tools, no forwarding of unselected secrets, captured-value
|
||||
semantics, and redaction of every forwarded value. Verify removal of obsolete
|
||||
configuration fields without preserving their compatibility behavior.
|
||||
|
||||
## Scope boundaries
|
||||
|
||||
No changes to pipeline order, transcript identity, downstream artifact
|
||||
definitions, or provider algorithms are intended. No automatic v1 configuration
|
||||
converter, Audita-internal resume mechanism, runtime binary-version negotiation,
|
||||
or live-service release gate is required. Debug-profile integration and ingestion
|
||||
of Audita's debug-only execution artifacts are future work.
|
||||
|
||||
The Notarius change is limited to credential configuration, forwarding, and
|
||||
associated diagnostics/documentation/tests; extraction and cache behavior are
|
||||
unchanged. This migration breaks existing pipeline configurations using removed
|
||||
fields; account for that explicitly in Narratio release versioning.
|
||||
@@ -1,102 +0,0 @@
|
||||
---
|
||||
title: Select a Notarius configuration profile through Narratio
|
||||
status: proposed
|
||||
consumer: rakestraw.dnd Ansible collection and its pipeline role
|
||||
|
||||
use_case: >-
|
||||
The Ansible pipeline role deploys Narratio and Notarius as independently
|
||||
configured applications. Operators select Narratio's testing profile to
|
||||
develop prompts and other pipeline assets with inexpensive models while
|
||||
retaining production settings in the base configuration. That selection
|
||||
currently cannot select a Notarius configuration profile, leaving extraction
|
||||
on its production settings.
|
||||
|
||||
desired_outcome: >-
|
||||
Narratio's testing overlay can explicitly select Notarius's testing overlay.
|
||||
Notarius owns the resulting model choices and any other testing-specific
|
||||
settings. The operator selects testing once when invoking Narratio, without
|
||||
editing production files or separately invoking Notarius.
|
||||
|
||||
rationale: >-
|
||||
Both applications already use ConfigKit configuration overlays. Selecting
|
||||
the downstream overlay preserves each application's configuration ownership
|
||||
and supports future Notarius testing adjustments without adding a Narratio
|
||||
configuration field for every downstream setting. This is explicit profile
|
||||
composition, not a requirement for arbitrary recursive orchestration.
|
||||
|
||||
requested_interface:
|
||||
field: pipeline.notarius.config_profile
|
||||
value: Optional Notarius ConfigKit configuration profile name
|
||||
supplied: >-
|
||||
Invoke Notarius with --config-profile and the selected name when extraction
|
||||
executes. The setting is available in Narratio's base configuration and
|
||||
its ordinary configuration overlays.
|
||||
omitted_or_null: >-
|
||||
Do not supply a profile-selection flag. Preserve existing Notarius
|
||||
configuration selection behavior.
|
||||
downstream_semantics: >-
|
||||
Retain Notarius's existing selector semantics, including the default
|
||||
selector for its base configuration. Notarius resolves profiles relative
|
||||
to its own configuration root, not Narratio's root.
|
||||
explicit_selection: >-
|
||||
Do not automatically forward Narratio's profile name. The selected
|
||||
Notarius profile may have the same name or a different name.
|
||||
distinction: >-
|
||||
This selects a ConfigKit configuration overlay through --config-profile,
|
||||
not a PromptKit LLM profile through --llm-profile. The Notarius overlay
|
||||
can itself select the desired LLM profiles using native Notarius settings.
|
||||
|
||||
illustrative_consumer_configuration:
|
||||
note: >-
|
||||
These are separate files managed by the Ansible suite, not a proposed
|
||||
combined configuration document. The Notarius pipeline and LLM profile
|
||||
names are illustrative; the referenced LLM profile must be available to
|
||||
Notarius.
|
||||
narratio_profiles_testing_yml: |
|
||||
notarius:
|
||||
config_profile: testing
|
||||
notarius_profiles_testing_yml: |
|
||||
pipelines:
|
||||
dnd-session:
|
||||
llm_profile: gemini-flash-latest
|
||||
operator_workflow: >-
|
||||
Select --profile testing on the ordinary Narratio invocation. Narratio
|
||||
selects Notarius's testing configuration overlay when it runs extraction;
|
||||
other Narratio testing overrides continue to apply normally.
|
||||
|
||||
observable_behavior:
|
||||
- >-
|
||||
Notarius owns overlay discovery, composition, validation, and the effective
|
||||
downstream settings. A missing or invalid selected overlay must not silently
|
||||
fall back to production or be reported as successful extraction.
|
||||
- >-
|
||||
Changing the selected Notarius configuration profile must not silently
|
||||
reuse Narratio's completed extraction from the previous selection.
|
||||
Existing downstream invalidation behavior applies when extraction changes.
|
||||
- >-
|
||||
Editing Notarius overlay contents behind an unchanged selector retains
|
||||
the existing operator responsibility to force extraction when needed.
|
||||
This request does not require inspecting or tracking private Notarius files.
|
||||
- >-
|
||||
Existing credential forwarding remains independently configurable through
|
||||
notarius.llm_api_key, including in the Narratio testing overlay when the
|
||||
selected Notarius settings require a different credential reference.
|
||||
|
||||
consumer_follow_up: >-
|
||||
After Narratio releases this interface, the standalone Narratio Ansible role
|
||||
can expose an optional variable and omit the field when unset. The suite role
|
||||
can deploy Notarius's testing overlay and select it from Narratio's testing
|
||||
overlay, then distribute the changes through the collection. These consumer
|
||||
updates are separate from this upstream feature request.
|
||||
|
||||
scope_boundaries:
|
||||
- No Notarius change is currently required; v0.7.0 supports --config-profile.
|
||||
- No separate Narratio-side Notarius LLM-profile selector is requested.
|
||||
- No automatic profile-name propagation or downstream configuration rewriting.
|
||||
- No new credential discovery, copying, or provider-name remapping.
|
||||
- This request specifies consumer behavior, not internal Narratio code changes.
|
||||
|
||||
references:
|
||||
narratio_configuration: ../config.md
|
||||
narratio_notarius_integration: ../integrations/notarius.md
|
||||
notarius_cli: https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.7.0/docs/cli.md
|
||||
@@ -1,171 +0,0 @@
|
||||
# Bugfix Request: Preserve Publish Destination Derivation with Explicit Rules
|
||||
|
||||
Status: Implemented; release target v2.1.1
|
||||
|
||||
## Summary
|
||||
|
||||
Narratio should successfully derive a publish destination when a valid
|
||||
`publish.outputs` rule omits `dest`, regardless of whether that rule explicitly
|
||||
sets `required`. Narratio v2.1.0 currently rejects this valid configuration in
|
||||
some cases with a ConfigKit `resolve.unrecorded_change` diagnostic.
|
||||
|
||||
This is a configuration-resolution bookkeeping defect, not a YAML formatting
|
||||
restriction. The fix should preserve the existing public configuration
|
||||
contract: operators may omit a derivable destination and may independently set
|
||||
`required` to either `true` or `false`.
|
||||
|
||||
## Observed Behavior
|
||||
|
||||
A pipeline containing a rule equivalent to the following fails during native
|
||||
configuration loading:
|
||||
|
||||
```yaml
|
||||
publish:
|
||||
outputs: [{"source": "narratio.transcript.final", "required": true}]
|
||||
```
|
||||
|
||||
Narratio reports:
|
||||
|
||||
```text
|
||||
error [resolve.unrecorded_change] /publish/outputs: application resolution changed a value without a covering record
|
||||
```
|
||||
|
||||
The same failure is possible with ordinary block-style YAML when `required` is
|
||||
explicit and `dest` is omitted. Flow-style YAML is valid input and is not the
|
||||
cause of the defect.
|
||||
|
||||
The existing destination-derivation tests do not expose this case because
|
||||
their rules also omit `required`. Narratio then supplies the default value for
|
||||
`required` and records a change covering the complete `publish.outputs`
|
||||
sequence. That broader record happens to cover the destination mutation as
|
||||
well, masking the missing resolution record that occurs when `required` is
|
||||
already explicit.
|
||||
|
||||
## Expected Contract
|
||||
|
||||
The current configuration contract remains unchanged:
|
||||
|
||||
- `publish.outputs[].source` is required;
|
||||
- `publish.outputs[].dest` may be omitted when Narratio can derive it from the
|
||||
selected built-in or configured artifact source;
|
||||
- `publish.outputs[].required` defaults to `true`, but an operator may set it
|
||||
explicitly to either `true` or `false`; and
|
||||
- equivalent valid YAML representations have equivalent configuration
|
||||
semantics.
|
||||
|
||||
For example, both rules below should load and validate, retain their explicit
|
||||
requiredness, and receive the canonical derived destination:
|
||||
|
||||
```yaml
|
||||
publish:
|
||||
outputs:
|
||||
- source: narratio.transcript.final
|
||||
required: true
|
||||
- source: narratio.transcript.final_markdown
|
||||
required: false
|
||||
```
|
||||
|
||||
## Root Cause
|
||||
|
||||
ConfigKit intentionally treats sequences as atomic when comparing values
|
||||
before and after application resolution. Changing a field within one
|
||||
`publish.outputs` entry is therefore observed as a change to the
|
||||
`/publish/outputs` sequence.
|
||||
|
||||
Narratio currently derives each missing destination by recording a
|
||||
normalization at the individual `publish.outputs[index].dest` path. That child
|
||||
record does not cover the atomic parent-sequence change. A separate
|
||||
container-level record is currently created only when Narratio also defaults
|
||||
an omitted `required` value, so configurations with explicit `required` values
|
||||
lose that incidental coverage.
|
||||
|
||||
## Recommended Fix
|
||||
|
||||
Make Narratio's publish-output resolution bookkeeping conform to ConfigKit's
|
||||
atomic-sequence contract. Whenever resolution derives one or more destinations
|
||||
inside `publish.outputs`, the recorded resolution changes must cover the
|
||||
`/publish/outputs` container. Destination derivation must not depend on an
|
||||
unrelated `required` default being applied in the same list.
|
||||
|
||||
The implementation may retain more specific provenance where useful, but it
|
||||
must provide valid container-level coverage for the sequence mutation. Do not
|
||||
change ConfigKit's sequence comparison semantics merely to accommodate this
|
||||
call site.
|
||||
|
||||
## Scope
|
||||
|
||||
- Correct destination derivation for publish rules that explicitly set
|
||||
`required` and omit a derivable `dest`.
|
||||
- Preserve explicit `required: true` and `required: false` values.
|
||||
- Preserve canonical destination derivation for built-in transcript sources
|
||||
and configured artifact sources.
|
||||
- Add focused regression coverage through Narratio's real configuration load
|
||||
and validation boundary.
|
||||
- Prepare a backward-compatible patch release after the fix passes the normal
|
||||
repository validation.
|
||||
|
||||
## Non-goals
|
||||
|
||||
- Changing the `publish.outputs` schema, defaults, source vocabulary, or
|
||||
destination derivation rules.
|
||||
- Requiring operators or configuration generators to supply `dest` when it is
|
||||
derivable.
|
||||
- Requiring operators to omit explicit `required: true` values.
|
||||
- Treating flow-style YAML or JSON-compatible YAML values as unsupported.
|
||||
- Changing ConfigKit's documented atomic treatment of sequences.
|
||||
- Adding storage, publication, or network integration behavior.
|
||||
|
||||
## Regression Coverage
|
||||
|
||||
Add one focused package-level behavioral test that loads and validates a
|
||||
pipeline with omitted destinations and explicit requiredness. A representative
|
||||
list should include both `required: true` and `required: false`, then assert
|
||||
that:
|
||||
|
||||
- loading and validation succeed;
|
||||
- each destination is derived from its source; and
|
||||
- each explicit `required` value is preserved.
|
||||
|
||||
Using the compact flow-style representation that exposed the integration
|
||||
failure is reasonable, while the existing block-style cases continue to cover
|
||||
omitted `required`. The test should exercise the public configuration behavior,
|
||||
not ConfigKit call choreography or Narratio's private recording mechanism.
|
||||
|
||||
No network service, object store, credential, or test double is required.
|
||||
|
||||
## Target End State
|
||||
|
||||
All valid publish rules with derivable sources behave consistently across
|
||||
these cases:
|
||||
|
||||
| `dest` | `required` | Result |
|
||||
| --- | --- | --- |
|
||||
| omitted | omitted | destination derived; required defaults to `true` |
|
||||
| omitted | `true` | destination derived; explicit `true` retained |
|
||||
| omitted | `false` | destination derived; explicit `false` retained |
|
||||
| explicit | either value | explicit destination and requiredness retained |
|
||||
|
||||
`narratio config validate`, `narratio config show`, and ordinary pipeline
|
||||
loading accept the corrected cases without an unrecorded-change diagnostic.
|
||||
No operator configuration migration or workaround is required.
|
||||
|
||||
## Release
|
||||
|
||||
This is a backward-compatible correction to documented configuration behavior
|
||||
and should be released as Narratio `v2.1.1`. The release note should identify
|
||||
the corrected explicit-required/derived-destination interaction and state that
|
||||
no special upgrade action is required.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- The focused regression test fails against v2.1.0 behavior and passes after
|
||||
the fix.
|
||||
- Publish rules with explicit `required: true` or `required: false` and omitted
|
||||
derivable destinations load and validate successfully.
|
||||
- Derived destinations and explicit requiredness appear correctly in the safe
|
||||
effective configuration.
|
||||
- Existing destination derivation, publish validation, imports, profiles, and
|
||||
configuration inspection tests remain green.
|
||||
- The complete repository validation and release-candidate checks pass.
|
||||
- The correction is published as the immutable `v2.1.1` tag with the required
|
||||
release note.
|
||||
@@ -1,482 +0,0 @@
|
||||
# Implementation Plan: Audita v2 and Shared Provider Credentials
|
||||
|
||||
Status: Complete (2026-09-25).
|
||||
|
||||
## Scope and working instructions
|
||||
|
||||
Implement [the Audita roadmap](audita.md). The baseline is Narratio commit
|
||||
`70f1dbf` (v2.2.1), with ConfigKit v0.4.0 and Audita v2.0.0 as the target
|
||||
upstream contracts. This replaces the completed checkpoint-refactoring plan,
|
||||
which remains in Git history.
|
||||
|
||||
Complete Stage 1 through Stage 8 in order, one bounded implementation prompt per
|
||||
stage for gpt-5.6-terra. Record completion and actual verification results under
|
||||
each stage. These instructions apply to the implementation sprint; the planning
|
||||
pass changes documentation only. Intermediate stages are not release candidates.
|
||||
Do not add compatibility code to make intermediate states look like a supported
|
||||
release.
|
||||
|
||||
Before each stage, read `AGENTS.md`, `docs/development.md`, and all policies
|
||||
under `docs/policy/`: agents, architecture, documentation, testing, and release.
|
||||
Read this plan's selected design and that stage's preparation. Use Go 1.26 and graph-first code
|
||||
discovery; inspect current files when graph results are incomplete. Preserve
|
||||
unrelated changes. Test at behavioral owners rather than replicating every case
|
||||
across configuration, adapter, stage, and command tests.
|
||||
|
||||
The user approved a clean cutover: no Audita v1 runner, deprecated aliases,
|
||||
compatibility shims, generated configuration conversion, or silently ignored
|
||||
old settings. Do not broaden that decision into a purge of unrelated legacy
|
||||
code or historical session data.
|
||||
|
||||
## Selected design
|
||||
|
||||
### ConfigKit and Narratio overlay terminology
|
||||
|
||||
Upgrade ConfigKit from v0.3.1 to v0.4.0 before adapter work. Rename its
|
||||
`Options.Profile`, `LayerProfile`, and any `CodeProfile*` uses to their overlay
|
||||
equivalents. Selected pipeline files move from `profiles/<name>.yml` to
|
||||
`overlays/<name>.yml`; no fallback directory or alias is permitted.
|
||||
|
||||
Rename Narratio's pipeline-selection flag to `--overlay` everywhere it is
|
||||
accepted, including convenience commands and configuration inspection. Rename
|
||||
application-owned selection types/helpers, help, errors, and current inspection
|
||||
labels consistently. `config diff` still takes two positional selections,
|
||||
now described as overlays. Preserve omission, explicit empty, and `default`
|
||||
as base selection; do not add a persistent default selector or new precedence.
|
||||
|
||||
Rename newly written informational provenance to overlay terminology, including
|
||||
`selected_overlay` in manifest configuration provenance. Do not add a dual-field
|
||||
reader, automatically rewrite historical manifests, or introduce a manifest-version
|
||||
rejection solely for this informational rename. Existing strict typed decoding
|
||||
rejects retired provenance fields. Document backed-up operator migration of
|
||||
that informational member without changing execution/checkpoint state; it does
|
||||
not become resume authority. Preserve
|
||||
semantic fingerprints and effective-value digest rules when values are unchanged.
|
||||
|
||||
Only Narratio pipeline configuration selection is renamed. Keep model/profile
|
||||
fields such as Scriptorium `profile_id`, Audita `proposal_profile` and
|
||||
`validation_profile`, and Notarius `config_profile` unchanged. Explicit imports
|
||||
from directories named `profiles` remain legal; only selected pipeline overlay
|
||||
discovery changes. Do not globally replace the word “profile.”
|
||||
|
||||
### Configuration and credentials
|
||||
|
||||
- Both `pipeline.audita.credentials` and `pipeline.notarius.credentials` are
|
||||
lists of ConfigKit secret references. Use `[]configkit.Secret`; each element
|
||||
is an actual reference rather than a nullable pointer. Existing ConfigKit
|
||||
validation owns name/value resolution. Omitted, null, or empty lists mean no
|
||||
additional credential forwarding.
|
||||
- Define each key once through existing environment/secrets-directory bootstrap.
|
||||
Forward it under its original name to each adapter whose list includes it.
|
||||
No alias mappings, provider registry, downstream config inspection, extra
|
||||
bootstrap, or inheritance of the entire environment.
|
||||
- Repeated names need no new rejection rule: forwarding the same captured
|
||||
reference once suffices. Arbitrary valid variable names remain supported;
|
||||
provider names in the roadmap are examples, not an allowlist.
|
||||
- Add a narrow shared helper in `internal/adapters/subprocess` converting resolved
|
||||
references to `EnvOverrides` and `SensitiveEnvNames`. It checks the existing
|
||||
resolved/nonempty requirement for direct adapter callers but never resolves
|
||||
secrets or rereads environment values. Errors expose no values. Both adapters
|
||||
use it; the ConfigKit upgrade is owned by Stage 1, not this helper. No new
|
||||
credential service is needed.
|
||||
- Configuration projections and diagnostic metadata contain reference names
|
||||
only. Register all forwarded names for existing captured-stream redaction.
|
||||
Downstream tools remain responsible for files they write themselves.
|
||||
- Remove both singular `llm_api_key` fields. For Audita also remove `base_url`,
|
||||
`model`, `validation_model`, `total_llm_concurrency`,
|
||||
`proposal_llm_concurrency`, `validation_llm_concurrency`,
|
||||
`work_dir_retention`, and `report`, including defaults and projections.
|
||||
- Retain Audita `binary`, `timeout`, `config_path`, `transcript_description`,
|
||||
`output_schema`, and `modules`. Add optional string selectors `overlay`,
|
||||
`proposal_profile`, and `validation_profile`: empty/unset means no CLI
|
||||
override. Audita owns downstream file/profile validation and native config
|
||||
discovery. Narratio overlay names are not implicitly Audita overlay names.
|
||||
- Preserve nil versus non-nil empty `modules` through loading, projection,
|
||||
cloning, composition, adapter defaults, and request overrides. Nil omits the
|
||||
flag; empty passes `--modules` with an empty argument; nonempty joins in order
|
||||
with repetitions intact. A nil request override uses the configured selection.
|
||||
Avoid clones that collapse empty slices to nil. YAML null follows unset
|
||||
behavior. Other adapters' module semantics do not change.
|
||||
|
||||
### Invocation, reports, and failure
|
||||
|
||||
Use `process INPUT --glossary PATH --output PATH` plus selected surviving
|
||||
overrides. Production passes no reporting or debug switches, including
|
||||
`--debug`, `--reporting=false`, `--report-dir`, or `--work-dir`.
|
||||
Remove required `WorkDir` and legacy `ReportPath` request/result plumbing.
|
||||
Document production external-config defaults without forcibly overriding or
|
||||
rejecting deliberate external reporting/debug choices.
|
||||
|
||||
Replace Audita's long positional config-values constructor with typed runner
|
||||
configuration. Keep timeout parsing in composition and subprocess cancellation
|
||||
through the existing runner. No version probe or automatic config-validation
|
||||
subprocess is required.
|
||||
|
||||
The corrected transcript remains the only canonical polish output, with existing
|
||||
identity, path, validation, and bounded file handling. Discover exactly
|
||||
`errors.yml`, `recoveries.yml`, and `report.md` beside the requested output.
|
||||
Represent available paths in a small typed report bundle in `PolishResult`.
|
||||
Fixed names belong to the adapter; do not parse stderr or recursively scan.
|
||||
|
||||
Reports are diagnostics, not a new correctness gate:
|
||||
|
||||
- Bound reads of present reports using the existing named 16 MiB report limit;
|
||||
retain confined regular-file handling and errors identifying Audita, the file,
|
||||
and limit. No new smaller limits or report schema/status/count validation is
|
||||
necessary when Narratio only preserves bytes; Markdown needs no parser.
|
||||
- Missing files are not independently fatal: external configuration can disable
|
||||
reports and early failures may produce none. Default-reporting success tests
|
||||
must nevertheless demonstrate capture of all three files.
|
||||
- On process failure, preserve available diagnostics and the original error;
|
||||
report-inspection errors must not hide it. Never promote an output merely
|
||||
because it exists following a nonzero exit.
|
||||
- Exit zero with a valid transcript may include recoverable errors or no model
|
||||
corrections. Accept it without a fail-on-recovery or minimum-correction rule.
|
||||
|
||||
Keep reports next to the run-local transcript, not in a second canonical
|
||||
destination. Register present report paths in the existing `StageResult.Logs`
|
||||
diagnostic collection alongside stdout/stderr, with safe bundle-path metadata.
|
||||
Reuse current manifest-driven diagnostic publication rather than adding a
|
||||
manifest schema or new publish source IDs. Physical placement does not define
|
||||
canonical artifact identity. Existing diagnostic retention/cleanup rules apply.
|
||||
|
||||
On failure, retain run-local files and expose the output/report directory in
|
||||
contextual errors. Do not add runner-wide failed-result persistence merely to
|
||||
register those files. Do not fabricate legacy JSON reports or delete historical
|
||||
reports. Normal successful stage-record replacement removes obsolete current
|
||||
output references.
|
||||
|
||||
Generated invocation YAML becomes `audita.generated.v2`, recording actual
|
||||
arguments, selections, paths, and credential names, never values. This remains
|
||||
a diagnostic invocation record, not an Audita configuration file.
|
||||
|
||||
### Resume boundary
|
||||
|
||||
Bump only polish semantic-config version from 1 to 2. Record config path,
|
||||
overlay/proposal/validation selectors, ordered modules with presence preserved,
|
||||
transcript description, output schema, and existing output identity. Remove old
|
||||
endpoint/model fields. Existing runner comparison reconsiders obsolete evidence
|
||||
when polish is selected; do not synthesize equivalent fingerprints or expand
|
||||
normal dependency/selection invalidation.
|
||||
|
||||
Credentials, binary path, timeout, and diagnostics are not semantic keys. Do not
|
||||
hash downstream config/profile contents; operators force polish after edits
|
||||
behind unchanged selections. Notarius credential migration does not change
|
||||
extraction fingerprints, references, force, resume, or chunk-cache behavior.
|
||||
|
||||
## Stage 1: Adopt ConfigKit v0.4.0 and pipeline overlays
|
||||
|
||||
Status: Complete (2026-09-25).
|
||||
|
||||
Verification: `go test ./internal/config ./internal/app ./internal/manifest`,
|
||||
`go test ./...`, `go test ./internal/doccheck`,
|
||||
`go test ./internal/config -run '^TestExamplesLoadAndValidate$'`, and
|
||||
`git diff --check` passed.
|
||||
|
||||
Preparation: ConfigKit v0.4.0 release notes and selected-overlay migration guide
|
||||
in `../ConfigKit/docs/`; Narratio `internal/config/pipeline_configkit.go`,
|
||||
`artifact_catalog.go`, `load.go`, `effective_digest.go`; CLI flag parsing and
|
||||
config commands in `internal/app/`; configuration provenance in
|
||||
`internal/manifest/manifest.go`; current config/CLI docs and pipeline examples.
|
||||
|
||||
1. Update `go.mod`/`go.sum` to ConfigKit v0.4.0 using normal module tooling;
|
||||
do not leave a local replacement or change unrelated dependencies.
|
||||
Replace removed ConfigKit APIs in loading, ownership, and artifact catalog
|
||||
inspection. Account for source layer `overlay` and diagnostic prefix
|
||||
`overlay.*` wherever they are consumed or asserted.
|
||||
2. Rename Narratio's pipeline selector to `--overlay` across all commands and
|
||||
aliases, load options, pair loading, inspection, provenance, and tests.
|
||||
Preserve explicit-presence handling through convenience commands and existing
|
||||
base/default selection. Remove `--profile` rather than retaining an alias.
|
||||
Apply the selected design's informational manifest-provenance treatment.
|
||||
3. Move maintained selected pipeline files and generated fixture paths to
|
||||
`overlays/`. Update current canonical documentation, policy terminology,
|
||||
examples, and user-visible migration guidance with the directory/flag break.
|
||||
Do not rewrite historical release notes, rename downstream model profiles,
|
||||
or prohibit ordinary explicit imports from a directory named `profiles`.
|
||||
4. Adapt existing config/app tests to prove base and named-overlay selection,
|
||||
imported defaults plus overrides, secret replacement/removal, source attribution
|
||||
through character-family expansion, config diff, and convenient-command
|
||||
forwarding. Add focused checks that the retired flag is rejected and the old
|
||||
directory is not a discovery fallback. Do not freeze incidental error wording.
|
||||
5. Verify unchanged effective values retain digest and stage-reuse behavior;
|
||||
only diagnostic source labels/paths and selected provenance terminology change.
|
||||
Test current provenance round trips and strict rejection of unknown/retired
|
||||
provenance fields. Document deliberate operator migration; do not add a
|
||||
compatibility decoder, semantic invalidation rule, or schema-version gate.
|
||||
6. Run focused and full tests before proceeding so failures from the dependency
|
||||
and terminology change are separated from adapter migrations. No Audita or
|
||||
Notarius credential/CLI behavior changes in this stage.
|
||||
|
||||
Verify: `go test ./internal/config ./internal/app ./internal/manifest`,
|
||||
`go test ./...`, `go test ./internal/doccheck`,
|
||||
`go test ./internal/config -run '^TestExamplesLoadAndValidate$'`, and
|
||||
`git diff --check`.
|
||||
|
||||
Done when Narratio uses ConfigKit v0.4.0, exposes pipeline overlays consistently,
|
||||
has no old selector/directory fallback, and preserves configuration semantics and
|
||||
downstream model-profile concepts.
|
||||
|
||||
## Stage 2: Add shared resolved-credential forwarding
|
||||
|
||||
Status: Complete (2026-09-25).
|
||||
|
||||
Verification: `go test ./internal/adapters/subprocess`,
|
||||
`go test -race ./internal/adapters/subprocess`, and `git diff --check` passed.
|
||||
|
||||
Preparation: `internal/adapters/subprocess/run.go`, its environment/redaction
|
||||
helpers and tests; `internal/adapters/notarius/subprocess.go`;
|
||||
`internal/config/credential_projection.go`; the pinned ConfigKit secret API.
|
||||
|
||||
1. Add the narrow helper described above. Return an independent environment map
|
||||
and selected sensitive names. No logging/serialization of values and no
|
||||
changes to minimal child environment inheritance.
|
||||
2. Test multiple custom names, empty lists, repeated names, unresolved references,
|
||||
and captured values after the parent environment changes. Reuse existing
|
||||
split/overlapping-stream redaction coverage rather than repeating its matrix.
|
||||
3. Leave production callers unchanged until their migrations.
|
||||
|
||||
Verify: `go test ./internal/adapters/subprocess` and
|
||||
`go test -race ./internal/adapters/subprocess`.
|
||||
|
||||
Done when both adapters can reuse one small conversion mechanism without adding
|
||||
a resolver, provider policy, or ambient-secret inheritance.
|
||||
|
||||
## Stage 3: Migrate Notarius to credential lists
|
||||
|
||||
Status: Complete (2026-09-25).
|
||||
|
||||
Verification: `go test ./internal/config ./internal/adapters/notarius ./internal/stage ./internal/app`,
|
||||
`go test -race ./internal/adapters/notarius`, and `git diff --check` passed.
|
||||
|
||||
Preparation: `internal/config/config.go`, `credential_projection.go`, loading/
|
||||
inspection tests; `internal/adapters/notarius/runner.go`, `subprocess.go`;
|
||||
`internal/stage/extract.go` and its request construction;
|
||||
`docs/integrations/notarius.md` and secret handling in `docs/config.md`.
|
||||
|
||||
1. Replace the singular field with the typed list across configuration,
|
||||
projection, request types, stage wiring, and adapter execution. Use Stage 2's
|
||||
helper and register all selected names for redaction.
|
||||
2. Update name-only metadata and config-show/diff/effective projections. Test
|
||||
real ConfigKit loading, overlay list replacement, and empty-list clearing.
|
||||
Preserve bootstrap precedence and existing load-time reference resolution,
|
||||
including references outside the selected stage range.
|
||||
3. Migrate maintained examples, fixtures, and current Notarius configuration/
|
||||
integration documentation for this field. Ordinary strict decoding rejects
|
||||
the old field; do not add a compatibility parser.
|
||||
4. Cover multi-key forwarding, unselected-key exclusion, empty selection,
|
||||
captured-value behavior, and custom-name redaction on success/failure.
|
||||
Keep extraction cache/reference/output tests as regression protection,
|
||||
not occasions to redesign extraction.
|
||||
|
||||
Verify: `go test ./internal/config ./internal/adapters/notarius ./internal/stage ./internal/app`
|
||||
and `go test -race ./internal/adapters/notarius`.
|
||||
|
||||
Done when Notarius uses credential lists end to end and no active singular
|
||||
credential path remains.
|
||||
|
||||
## Stage 4: Cut Audita configuration and adapter over to v2
|
||||
|
||||
Status: Complete (2026-09-25).
|
||||
|
||||
Verification: `go test ./internal/config ./internal/adapters/audita ./internal/stage ./internal/app`,
|
||||
`go test -race ./internal/adapters/audita`, `go test ./...`, and
|
||||
`git diff --check` passed.
|
||||
|
||||
Preparation: Audita v2.0.0 `docs/migrations/v2.md`, `docs/cli.md`,
|
||||
`docs/integrations/subprocess.md`, and `docs/integrations/output-files.md` in
|
||||
`../audita/`; Narratio `internal/adapters/audita/`,
|
||||
`internal/app/runner.go` (`buildDefaultAuditaRunner`), and config types,
|
||||
defaults, validation, and credential projection.
|
||||
|
||||
1. Replace the Audita configuration surface as selected above, updating defaults,
|
||||
validation, safe projection, examples, and config fixtures. Prove nil/empty
|
||||
modules survive real configuration loading and overlay overrides.
|
||||
2. Migrate runner construction, selectors, and credential forwarding. Remove
|
||||
retired flags, fixed credential alias, required work-directory plumbing, and
|
||||
old JSON-report validation. Add the typed report bundle.
|
||||
3. Implement adjacent report discovery, bounded reads, failure results, and
|
||||
generated invocation v2. Share metadata construction between success/failure
|
||||
instead of maintaining duplicate field maps.
|
||||
4. Rewrite the Audita subprocess fixture to model v2 argument acceptance and
|
||||
output placement. Cover omitted/selected selectors, ordered/repeated/empty
|
||||
modules, no report/debug switches, malformed/missing transcript, ordinary
|
||||
reports, externally disabled reporting, recoverable-error success, and
|
||||
nonzero exit after transcript creation. Cover multiple custom credential names
|
||||
and redaction; preserve timeout/cancellation coverage at its existing owner.
|
||||
5. Make mechanical polish and app-fixture adjustments needed to compile: remove
|
||||
obsolete request/metadata fields and old report materialization. Stage 5 owns
|
||||
complete diagnostic integration. Remove retired fingerprint members as needed
|
||||
to compile; Stage 6 completes the replacement semantic contract. These are
|
||||
bounded call-site changes, not permission to introduce transitional shims.
|
||||
|
||||
Verify: `go test ./internal/config ./internal/adapters/audita ./internal/stage ./internal/app`
|
||||
and `go test -race ./internal/adapters/audita`.
|
||||
|
||||
Done when configuration composes a v2-only adapter and subprocess tests prove its
|
||||
credential/transcript/report boundary. Stages 5 and 6 complete diagnostic and
|
||||
semantic integration; all stages are required before release.
|
||||
|
||||
## Stage 5: Integrate polish reports with diagnostic lifecycle
|
||||
|
||||
Status: Complete (2026-09-25).
|
||||
|
||||
Verification: `go test ./internal/stage ./internal/app ./internal/manifest ./internal/artifacts`,
|
||||
`go test -race ./internal/stage ./internal/app`, and `git diff --check` passed.
|
||||
|
||||
Preparation: `internal/stage/polish.go`, `polish_test.go`, `run_local.go`,
|
||||
`stage.go`, `publish_sources.go`; result application in `internal/app/runner.go`;
|
||||
publish/restore diagnostic tests; `docs/internal/stage-polish.md`.
|
||||
|
||||
1. Finish stage integration: materialize only the canonical polished transcript;
|
||||
register available adjacent reports as diagnostics plus safe metadata and
|
||||
existing logs/generated invocation references. Remove old `audita_report`
|
||||
production and stale stage metadata.
|
||||
2. Use existing authoritative-path checks for the requested transcript and fixed
|
||||
adjacent report paths. Do not accept arbitrary fake-returned paths, scan
|
||||
directories, or copy reports to a second destination. Preserve workspace
|
||||
handling/modes.
|
||||
3. On execution failure, preserve canonical transcript authority and run-local
|
||||
diagnostics, with actionable directory/log context and original error identity.
|
||||
Test failure after output creation.
|
||||
4. Adapt the fake and app helper. With real manifest/store collaborators, prove
|
||||
successful promotion, report references, absence of report canonical outputs,
|
||||
and current-run diagnostic publication. Preserve restore's existing scope of
|
||||
declared committed transcript/artifact objects: run-archive diagnostics do not
|
||||
become automatically restored canonical objects. Test that report references
|
||||
do not create new required canonical restore targets. Document remote diagnostic
|
||||
inspection separately; no new diagnostic-restore feature is authorized.
|
||||
5. Leave historical files untouched. Update tests expecting a second canonical
|
||||
polish output without introducing a manifest-format migration.
|
||||
|
||||
Verify: `go test ./internal/stage ./internal/app ./internal/manifest ./internal/artifacts`
|
||||
and `go test -race ./internal/stage ./internal/app`.
|
||||
|
||||
Done when reports use existing diagnostic lifecycle and failed execution cannot
|
||||
promote an incidental transcript.
|
||||
|
||||
## Stage 6: Complete semantic evidence and resume behavior
|
||||
|
||||
Status: Complete (2026-09-25).
|
||||
|
||||
Verification: `go test ./internal/stage ./internal/app`,
|
||||
`go test -race ./internal/stage ./internal/app`, and `git diff --check` passed.
|
||||
|
||||
Preparation: `internal/stage/semantic_contracts_refinement.go`, semantic
|
||||
fingerprint tests, app runner semantic comparison tests, and extraction semantic
|
||||
configuration tests (locate their current owners through graph discovery).
|
||||
|
||||
1. Implement polish evidence version 2 and the selected payload. Remove sorting;
|
||||
preserve nil/empty distinction in payload encoding and copies.
|
||||
2. Test changes from module order/repetition/presence and external selectors.
|
||||
Credentials and execution-only settings do not change evidence. Avoid
|
||||
assertions on incidental digest literals.
|
||||
3. Exercise old-version evidence through runner resume behavior: selected polish
|
||||
is reconsidered and normal dependent invalidation applies. Downstream-only
|
||||
bounded execution does not unexpectedly invoke polish. Unchanged new evidence
|
||||
reuses valid completed output.
|
||||
4. Confirm credential-list changes leave extraction semantic/cache behavior
|
||||
unchanged. No downstream file-content scanning or eager fingerprint migration.
|
||||
|
||||
Verify: `go test ./internal/stage ./internal/app` and
|
||||
`go test -race ./internal/stage ./internal/app`.
|
||||
|
||||
Done when selections affect reuse accurately without blanket credential/config
|
||||
invalidation or changes to unselected-stage execution.
|
||||
|
||||
## Stage 7: Complete operator migration documentation and examples
|
||||
|
||||
Status: Complete (2026-09-25).
|
||||
|
||||
Verification: `go test ./internal/doccheck`,
|
||||
`go test ./internal/config -run '^TestExamplesLoadAndValidate$'`, and
|
||||
`git diff --check` passed.
|
||||
|
||||
Preparation: documentation policy; `docs/config.md`, `docs/operations.md`,
|
||||
`docs/troubleshooting.md`, both integration guides,
|
||||
`docs/internal/adapters.md`, `docs/internal/stage-polish.md`, and pipeline examples.
|
||||
|
||||
1. Complete current-behavior documentation as implementation lands. Configuration
|
||||
owns fields/defaults; integrations own external contracts; operations owns
|
||||
placement and migration; internal docs explain ownership and link onward.
|
||||
2. Provide an old-to-new migration table: endpoints/capacity move to Audita
|
||||
backends, models to profiles, role selection to selectors, and credentials to
|
||||
provider-named lists. Remove report/retention settings. Explain Audita's
|
||||
all-configured-backend credential resolution and Notarius's profile lookup.
|
||||
3. Describe preparing and validating Audita v2 config offline with its documented
|
||||
command before switching executables. Link upstream examples rather than
|
||||
building a downstream configuration generator. Explain ordinary reports,
|
||||
recoverable-error success, and force after edits behind unchanged selectors.
|
||||
4. Production examples omit modules when upstream defaults are intended;
|
||||
`modules: []` deliberately disables correction modules. Production external
|
||||
Audita config keeps reports enabled/debug disabled, without Narratio flag
|
||||
overrides. Testing-profile debug integration remains deferred.
|
||||
5. Document the configuration-breaking clean cutover for release-version
|
||||
consideration. Do not edit historical release records, tag a release, or
|
||||
remove unrelated roadmaps.
|
||||
|
||||
Verify: `go test ./internal/doccheck`,
|
||||
`go test ./internal/config -run '^TestExamplesLoadAndValidate$'`, and
|
||||
`git diff --check`.
|
||||
|
||||
Done when operators can migrate using valid examples without obsolete fields,
|
||||
implicit credential aliases, or retired CLI/report expectations.
|
||||
|
||||
## Stage 8: Verify assembled behavior and audit scope
|
||||
|
||||
Status: Complete (2026-09-25).
|
||||
|
||||
Verification: the offline app-level shared/Audita-only credential scenario
|
||||
passed with config bootstrap, both subprocess fixtures, safe inspection/logging,
|
||||
and ordinary polish reports. The tagged Audita v2.0.0 CLI validated its minimal
|
||||
configuration and produced a transcript plus all three reports with an empty
|
||||
module sequence and no provider request. Active-reference and scope audits found
|
||||
no removed production fields or compatibility path; remaining old names occur in
|
||||
migration guidance, explicit-rejection checks, or historical fixtures. `go test
|
||||
./...`, `go test -race ./...`, `go vet ./...`, `go build ./...`, `go test
|
||||
./internal/doccheck`, `go test ./internal/config -run
|
||||
'^TestExamplesLoadAndValidate$'`, and `git diff --check` passed.
|
||||
|
||||
Preparation: cumulative diff, this plan, feature roadmap, app configuration/
|
||||
subprocess integration tests, and all policies.
|
||||
|
||||
1. Adapt or add one representative offline app-level scenario showing one
|
||||
provider-named secret source supplying both adapters and another key selected
|
||||
only for Audita. Use real config/bootstrap/composition with subprocess fixtures.
|
||||
Prove safe inspection/logging and successful polish reports. Leave exhaustive
|
||||
flag/redaction cases at lower layers.
|
||||
2. Where the tagged Audita checkout is available, smoke-test CLI acceptance and
|
||||
ordinary transcript/reports offline with an explicit minimal v2 config,
|
||||
unauthenticated backend/profile fixtures, and an empty module sequence.
|
||||
No provider requests or production credentials. This is optional local evidence,
|
||||
not a default test dependent on sibling checkouts or installed tools.
|
||||
3. Audit active references to removed fields/flags/aliases; historical release
|
||||
notes and completed roadmaps are not compatibility code. Review tests
|
||||
collectively for duplication while retaining consequential failure coverage.
|
||||
4. Confirm no provider-name restrictions, duplicate-name rejection, downstream
|
||||
content hashing, fail-on-recovery rule, mandatory explicit config path, debug
|
||||
requirement, live-service gate, pipeline-order change, or Notarius cache change
|
||||
slipped in. Do not require missing reports when disabled externally. Surface
|
||||
additional policy choices rather than encoding them silently in tests.
|
||||
5. Run every gate below and record actual results. Mark complete only after all
|
||||
stages and gates pass. No release, tag, push, or unrelated cleanup in this plan.
|
||||
|
||||
```sh
|
||||
go test ./...
|
||||
go test -race ./...
|
||||
go vet ./...
|
||||
go build ./...
|
||||
go test ./internal/doccheck
|
||||
go test ./internal/config -run '^TestExamplesLoadAndValidate$'
|
||||
git diff --check
|
||||
```
|
||||
|
||||
Done when the assembled v2 integration and shared credentials meet the roadmap,
|
||||
verification passes, and no compatibility machinery remains within scope.
|
||||
|
||||
## Open Questions
|
||||
|
||||
None requiring a product decision before implementation. The user settled the
|
||||
clean cutover and shared provider-named lists. Reports use existing diagnostics
|
||||
without new content-based success criteria; debug-profile work remains deferred.
|
||||
Release version selection belongs to the later release procedure.
|
||||
@@ -1,151 +0,0 @@
|
||||
# Notarius Configuration Profile Selection
|
||||
|
||||
Status: Implemented.
|
||||
|
||||
## Goal and Authority
|
||||
|
||||
Implement the consumer behavior in the
|
||||
[feature request](feature-request-notarius-config-profile.yml): let a Narratio
|
||||
configuration overlay explicitly select a Notarius configuration overlay.
|
||||
Operators can select testing once in Narratio while each application retains
|
||||
ownership of its own model choices and other settings.
|
||||
|
||||
This roadmap describes the target state and required change areas, not an
|
||||
implementation sequence; the [implementation plan](implementation.md) owns
|
||||
the ordered work and implementation decisions. The feature request is the scope
|
||||
authority; the mechanisms suggested below do not establish additional
|
||||
user-facing contracts.
|
||||
|
||||
## Underlying Issue
|
||||
|
||||
Narratio can select its own testing profile, but extraction currently invokes
|
||||
Notarius without a configuration-profile selector. Consequently, a Narratio
|
||||
testing invocation cannot explicitly select the independently deployed Notarius
|
||||
testing overlay through pipeline configuration.
|
||||
|
||||
Adding individual downstream model or tuning fields would duplicate Notarius's
|
||||
configuration responsibilities. Passing its existing profile selector provides
|
||||
the requested flexibility without that duplication.
|
||||
|
||||
## Targeted End State
|
||||
|
||||
### Explicit Configuration Composition
|
||||
|
||||
`pipeline.notarius.config_profile` is an optional Notarius configuration-profile
|
||||
name, usable in Narratio's base configuration and ordinary overlays. For
|
||||
example, Narratio's `profiles/testing.yml` may contain:
|
||||
|
||||
```yaml
|
||||
notarius:
|
||||
config_profile: testing
|
||||
```
|
||||
|
||||
Selecting Narratio's `--profile testing` then selects that explicit downstream
|
||||
profile whenever extraction executes. The two profile names need not match.
|
||||
Narratio does not automatically forward its own profile name.
|
||||
|
||||
When supplied, the selection is passed through Notarius's `--config-profile`
|
||||
argument. Omitted or null values add no profile-selection flag and preserve
|
||||
existing downstream selection behavior. Notarius's selector semantics remain
|
||||
authoritative, including empty and `default` selections for the composed base
|
||||
configuration. Narratio does not introduce a stricter profile-name policy.
|
||||
|
||||
This field selects a ConfigKit configuration overlay, not a PromptKit profile
|
||||
through `--llm-profile`. The Notarius overlay owns any resulting LLM-profile
|
||||
selection. Notarius resolves overlays relative to its own configuration root;
|
||||
Narratio neither resolves those files against its own root nor rewrites them.
|
||||
|
||||
### Execution, Reuse, and Failure
|
||||
|
||||
A changed downstream profile selection must not silently reuse Narratio's
|
||||
completed extraction from the previous selection. Existing dependent-stage
|
||||
invalidation applies when extraction changes; the feature does not change the
|
||||
pipeline order or transcript-generation behavior.
|
||||
|
||||
Notarius continues to own downstream overlay discovery, composition, validation,
|
||||
and cache compatibility. A missing or invalid selected overlay must fail
|
||||
extraction through the existing subprocess error path, without silently falling
|
||||
back to production or reporting successful extraction.
|
||||
|
||||
Existing resume and chunk-cache controls, including force precedence, remain
|
||||
in place. Profile selection does not itself mean forced regeneration or cache
|
||||
deletion. Narratio's decision to execute extraction and Notarius's decision to
|
||||
reuse compatible work remain separate responsibilities.
|
||||
|
||||
Changes to private Notarius configuration behind an unchanged selector retain
|
||||
the existing operator responsibility to force extraction when needed. There is
|
||||
no new downstream file inspection or content-tracking requirement.
|
||||
|
||||
Credential forwarding remains independently configured through
|
||||
`notarius.llm_api_key`. A Narratio testing overlay may select a different
|
||||
credential reference alongside the downstream profile; no new credential
|
||||
discovery or provider-name mapping is introduced.
|
||||
|
||||
## Required Change Areas
|
||||
|
||||
### Configuration and Inspection
|
||||
|
||||
Extend the typed Notarius configuration and its existing safe effective-YAML
|
||||
projection to carry the optional field. Preserve the ordinary configuration
|
||||
composition behavior for base values, overlay overrides, and null values.
|
||||
Configuration inspection must reflect the selected field without exposing
|
||||
credential values. No replacement configuration loader or downstream preflight
|
||||
loader is needed.
|
||||
|
||||
### Stage and Adapter Boundary
|
||||
|
||||
Carry the selection from resolved configuration through the extraction request
|
||||
to the subprocess adapter. Construct the optional CLI flag using the existing
|
||||
argument-vector mechanism, alongside the current configuration path, references,
|
||||
credential forwarding, and cache controls. Retain normal Notarius error handling.
|
||||
|
||||
### Extraction Reuse Evidence
|
||||
|
||||
Account for the downstream selection in the existing extraction reuse evidence.
|
||||
The current semantic-configuration and invocation fingerprints are the relevant
|
||||
change points. Keep their treatment of selection consistent so that a profile
|
||||
change cannot bypass the required rerun and downstream invalidation.
|
||||
|
||||
This roadmap does not require a new manifest schema, separate profile-indexed
|
||||
workspaces, historical per-profile result retention, or an upgrade-wide forced
|
||||
rerun.
|
||||
|
||||
### Verification and Documentation
|
||||
|
||||
Use focused behavioral coverage for configuration composition and inspection,
|
||||
explicit argument forwarding and omission, changed-selection reuse decisions,
|
||||
and ordinary subprocess failure handling. Reuse existing test coverage where
|
||||
it already protects unchanged credentials, force behavior, and invalidation;
|
||||
do not duplicate Notarius's complete profile-validation or cache test suites.
|
||||
|
||||
When implemented, update the canonical
|
||||
[configuration reference](../config.md),
|
||||
[Notarius integration contract](../integrations/notarius.md),
|
||||
[extract internals](../internal/stage-extract.md), and relevant maintained
|
||||
examples. The development workflow in [Operations](../operations.md) should
|
||||
explain explicit profile composition and the existing need to force extraction
|
||||
after private downstream edits. Clarify that profile selection does not create
|
||||
an isolated testing workspace or separate current extraction state.
|
||||
|
||||
## Compatibility and Scope Boundaries
|
||||
|
||||
Notarius v0.7.0 already documents `--config-profile`; no upstream change is
|
||||
required. Document the capability needed when the option is used, without adding
|
||||
an unconditional runtime version gate for existing unconfigured deployments.
|
||||
|
||||
This feature adds no Narratio CLI selector, automatic profile propagation,
|
||||
Notarius LLM-profile selector, downstream configuration rewriting, new
|
||||
credential mechanism, or generalized recursive orchestration. Existing output
|
||||
and receipt contracts remain unchanged.
|
||||
|
||||
The consumer's Ansible role and suite updates are follow-up work outside this
|
||||
repository. They can deploy downstream overlays and populate this field after
|
||||
the interface is released.
|
||||
|
||||
## Scope Review
|
||||
|
||||
No stronger requirements or new invariants are proposed beyond the feature
|
||||
request and existing repository contracts. In particular, minimizing one-time
|
||||
upgrade invalidation and avoiding reruns between equivalent base selectors are
|
||||
implementation considerations, not additional acceptance guarantees imposed
|
||||
by this roadmap. No user decisions are currently required before planning.
|
||||
@@ -1,227 +0,0 @@
|
||||
# Audita v2 and ConfigKit Migration Review Remediation
|
||||
|
||||
Status: Complete.
|
||||
|
||||
Reviewed `83eaa96` through `fae18bf` against the approved clean-cutover decisions,
|
||||
[feature roadmap](audita.md), and [implementation plan](implementation.md).
|
||||
Review date: 2026-09-25. No production changes were made. The previous completed
|
||||
transcription review is retained below as historical context.
|
||||
|
||||
## 1. Preserve omitted modules in direct YAML serialization
|
||||
|
||||
Priority: P2. Status: Complete.
|
||||
|
||||
The safe YAML projection now omits nil modules while retaining explicit empty
|
||||
and ordered/repeated selections. A round-trip regression failed before the fix
|
||||
and passes afterward. Config package tests, including credential-safety coverage,
|
||||
and its race tests pass.
|
||||
|
||||
Location: `internal/config/credential_projection.go:25` (`AuditaConfig.MarshalYAML`),
|
||||
especially the plain slice field at line 30 and assignment at line 40.
|
||||
|
||||
The direct safe YAML projection passes a nil module slice to yaml.v3, which
|
||||
serializes it as `modules: []`. Loading that output produces a non-nil empty
|
||||
slice. Under the new Audita contract these are different instructions: nil
|
||||
delegates to Audita's configuration/default sequence; empty passes an explicit
|
||||
empty module argument and disables correction modules. Serialization therefore
|
||||
silently changes behavior for a configuration that is subsequently reloaded.
|
||||
|
||||
Evidence: a temporary package test marshaled
|
||||
`AuditaConfig{Binary: "audita", Timeout: "3h"}`, unmarshaled it into another
|
||||
`AuditaConfig`, and required `Modules == nil`. It failed with output containing
|
||||
`modules: []`. The test was removed after reproduction. This concerns direct
|
||||
`yaml.Marshal` of the typed configuration; ordinary CLI `config show` uses
|
||||
`MarshalEffectivePipeline` through a separate JSON/value-tree projection and
|
||||
does not use this faulty path.
|
||||
|
||||
Required remediation:
|
||||
|
||||
- Make the direct safe YAML projection preserve nil as null or omission and
|
||||
explicit empty as `[]`. Do not simply add `omitempty` to the slice: that would
|
||||
instead erase the explicit empty selection.
|
||||
- Keep credential serialization name-only and preserve module order/repetitions.
|
||||
- Add a small round-trip regression covering nil, explicit empty, and an ordered
|
||||
repeated selection; retain effective-output inspection coverage without
|
||||
duplicating its whole test matrix.
|
||||
|
||||
## 2. Remove the unapproved manifest compatibility decoder
|
||||
|
||||
Priority: P2. Status: Complete.
|
||||
|
||||
Removed the permissive custom decoder; ordinary strict typed decoding now
|
||||
applies to provenance as well. Replaced historical-acceptance coverage with
|
||||
retired/unknown-field rejection tests, all of which failed before removal.
|
||||
Current provenance round-trip coverage remains intact. Corrected the roadmap,
|
||||
plan, internal contract, and operator guidance for narrow backed-up migration
|
||||
without discarding execution/checkpoint state or changing resume authority.
|
||||
|
||||
Location: `internal/manifest/manifest.go:79-89`,
|
||||
`internal/manifest/store_test.go:78`, and `docs/internal/manifest.md`'s decoding
|
||||
contract. Also correct the conflicting migration language in the plan/roadmap.
|
||||
|
||||
The new `EffectiveConfigProvenance.UnmarshalJSON` bypasses the manifest store's
|
||||
`DisallowUnknownFields` by using permissive `json.Unmarshal` for the entire
|
||||
provenance object. It accepts retired `selected_profile` data and silently
|
||||
discards it. It also silently accepts unknown current provenance fields,
|
||||
including unknown nested selection fields, rather than limiting behavior to
|
||||
the renamed label.
|
||||
|
||||
The user expressly selected a clean cutover without backward-compatibility
|
||||
shims. This adds precisely such a shim and a new historical-input acceptance
|
||||
guarantee. The regression test explicitly requires the old selection to load,
|
||||
and the internal guide now declares permissive informational-field decoding.
|
||||
|
||||
The plan contributed to this divergence: it said existing generic decoding
|
||||
would handle historical optional provenance and required old manifests to load.
|
||||
That assumption was false; the baseline store already strictly decoded these
|
||||
fields. Repetition in the plan, tests, and documentation does not authorize
|
||||
overriding the user's clean-cutover decision.
|
||||
|
||||
Required remediation:
|
||||
|
||||
- Remove the custom compatibility unmarshaler and retain ordinary strict typed
|
||||
decoding for the new `selected_overlay` representation. Do not add dual fields,
|
||||
special retired-field handling, automatic manifest rewrites, or a format-version
|
||||
bump just for this rename.
|
||||
- Replace the historical-acceptance test with coverage for current provenance
|
||||
round trips and unknown/retired provenance rejection through the real store.
|
||||
- Correct the plan and current documentation to acknowledge the upgrade effect:
|
||||
manifests with retired provenance require deliberate operator migration before
|
||||
loading. Document narrow removal/renaming of retired informational provenance
|
||||
on a backed-up manifest, preserving execution/checkpoint state; do not advise
|
||||
deleting all session progress or rerunning everything.
|
||||
- Keep provenance informational: this correction does not authorize adding it
|
||||
to semantic resume keys or invalidating work based on overlay identity alone.
|
||||
|
||||
If transparent historical-manifest acceptance is desired instead, obtain an
|
||||
explicit exception to the clean-cutover decision before retaining a compatibility
|
||||
reader. Do not treat that exception as already granted.
|
||||
|
||||
## Review verification
|
||||
|
||||
The following records the original review, before remediation.
|
||||
|
||||
- Existing `go test ./...` passed.
|
||||
- Race tests passed for subprocess, Audita, Notarius, config, stage, app, and
|
||||
manifest packages after removing the temporary reproduction.
|
||||
- `go vet ./...` passed.
|
||||
- The temporary direct-YAML regression failed as described above.
|
||||
- Source inspection and the new historical-provenance test establish finding 2;
|
||||
`LocalStore.LoadReader` still uses strict decoding outside the custom hook.
|
||||
|
||||
The primary architecture is otherwise in place: ConfigKit v0.4.0 overlays,
|
||||
shared named credential forwarding/redaction, a v2-only Audita subprocess
|
||||
adapter, ordinary reports as diagnostics, and versioned ordered-module polish
|
||||
evidence. No live model/provider runs were performed during this review.
|
||||
|
||||
## Migration remediation verification
|
||||
|
||||
Completed on 2026-09-25. Both new regressions failed before their respective
|
||||
fixes. After remediation, `go test ./...`, `go test -race ./...`,
|
||||
`go vet ./...`, `go build ./...`, documentation checks, maintained configuration
|
||||
example checks, and `git diff --check` passed. No live provider runs were needed.
|
||||
|
||||
## Historical completed transcription review
|
||||
|
||||
Status: Complete.
|
||||
|
||||
Reviewed commits `7b0bf99` through `96b4e73` against the speaker-checkpoint and
|
||||
upload-replay roadmap and the original user request. No production changes were
|
||||
made during review. The two failures below were reproduced with temporary tests
|
||||
using the existing stage fixtures; those temporary tests were removed afterward.
|
||||
|
||||
### 1. Reconcile Aggregate State Even When No Speaker Needs HTTP Work
|
||||
|
||||
Priority: P2. Status: Complete.
|
||||
|
||||
Implemented read-only aggregate identity/evidence checks before resume skips.
|
||||
Regression tests cover removed inputs, missing/duplicate/mismatched outputs,
|
||||
repair without HTTP requests, downstream invalidation, and exclusion of removed
|
||||
speakers from merge without deleting their files. Equivalent path forms and
|
||||
output ordering remain reusable. Focused app/stage tests and documentation
|
||||
checks pass.
|
||||
|
||||
Location: `internal/stage/transcribe_resume.go:21` and the reconciliation result
|
||||
consumed there.
|
||||
|
||||
`ValidateResume` returns reusable whenever `reconciliation.work` is empty. That
|
||||
only establishes that the remaining speakers need no transcription; it does
|
||||
not establish that the stored speaker collection and aggregate outputs match
|
||||
the current input set. Removing a speaker while the remaining inputs are
|
||||
unchanged produces an empty work list, so a succeeded record can be skipped
|
||||
without pruning the removed speaker. Its old aggregate output can then remain
|
||||
available to merge. Likewise, missing/inconsistent aggregate output references
|
||||
are not repaired when all individual checkpoints remain valid. A prepare rerun
|
||||
may already stale transcribe in some workflows, but the resume validator cannot
|
||||
rely on that to satisfy its own current-input/output checks.
|
||||
|
||||
Reproduction: create complete alice/bob checkpoint records and aggregate
|
||||
outputs with the existing fixture, mark the stage succeeded, remove bob from
|
||||
the manifest's audio inputs, and call `ValidateResume`. It returns reusable
|
||||
despite still retaining bob in the stored collection and aggregate outputs.
|
||||
|
||||
Required change:
|
||||
|
||||
- Distinguish no HTTP work from no reconciliation work. Validate that the
|
||||
committed speaker set and aggregate transcript references represent the
|
||||
reconciled current set, including relevant identity/evidence, before skipping.
|
||||
- When only collection/output repair is needed, return non-resumable and let
|
||||
normal execution checkpoint the pruned collection and rebuild aggregate
|
||||
outputs without retranscribing reusable speakers. Preserve existing dependent
|
||||
invalidation; do not force otherwise-current speaker jobs.
|
||||
- Keep resume inspection read-only. Do not fix this by deleting incidental
|
||||
transcript files or changing stage selection rules.
|
||||
|
||||
Verification: add removed-only input coverage (not just removal combined with
|
||||
an added speaker), plus incomplete/inconsistent aggregate output coverage.
|
||||
Exercise the runner skip path and assert zero additional WhisperX requests,
|
||||
correct rebuilt outputs, and no removed speaker reaching merge.
|
||||
|
||||
### 2. Remove the Unrequested Positive Audio-Size Requirement
|
||||
|
||||
Priority: P2. Status: Complete.
|
||||
|
||||
Audio evidence now permits zero size while still rejecting negative values.
|
||||
Regression tests verify zero-size manifest round trips, successful service
|
||||
results being checkpointed and reused, and service rejection being propagated
|
||||
without creating a completion record. Nonempty valid-JSON output validation is
|
||||
unchanged. Both new success regressions failed before the fix.
|
||||
|
||||
Location: `internal/manifest/transcribe_state.go:95`.
|
||||
|
||||
The new record validator requires `AudioSize > 0`. Previously Narratio accepted
|
||||
a regular `.flac` file and delegated transcription acceptance to WhisperX;
|
||||
neither the user request nor the roadmap introduced minimum audio size or a new
|
||||
audio-content validation policy. Zero-byte content still has a valid checksum
|
||||
and can be represented by the checkpoint mechanism. The current check runs
|
||||
after a successful response and output materialization, causing the entire
|
||||
stage to fail instead of retaining the completed work.
|
||||
|
||||
Reproduction: prepare one speaker, replace its prepared audio with an empty
|
||||
regular file, and use the existing successful fake WhisperX client. Stage
|
||||
execution fails at checkpoint validation with `audio_size must be positive`.
|
||||
This demonstrates the extra Narratio restriction; it does not assert that a
|
||||
particular production WhisperX deployment accepts empty audio.
|
||||
|
||||
Required change:
|
||||
|
||||
- Permit zero audio size and reject negative sizes. Keep byte hashing and
|
||||
size equality checks. Let the downstream service decide whether the input
|
||||
can be transcribed, as before.
|
||||
- Do not remove the nonempty valid-JSON output requirement, which has a separate
|
||||
existing justification. Do not add a new early empty-audio rejection instead.
|
||||
- Update any new tests/documentation that promote strictly positive input size
|
||||
to a contract.
|
||||
|
||||
Verification: cover a zero-size record round-trip and successful adapter result
|
||||
being checkpointed/reused for that input; retain negative-size rejection and
|
||||
ordinary downstream-failure tests.
|
||||
|
||||
### Verification After Remediation
|
||||
|
||||
Completed on 2026-09-22 with Go 1.26.8: focused stage/application tests,
|
||||
changed-package race tests, `go test ./...`, `go test -race ./...`,
|
||||
`go vet ./...`, `go build ./...`, `go test ./internal/doccheck`,
|
||||
`go test ./internal/config -run '^TestExamplesLoadAndValidate$'`, and
|
||||
`git diff --check` all passed. Existing replay and cancellation regression
|
||||
tests remain intact; the HTTP adapter required no changes.
|
||||
@@ -1,183 +0,0 @@
|
||||
# Resumable Speaker Transcription and Replayable Uploads
|
||||
|
||||
Status: Implemented.
|
||||
|
||||
## Goal and User Intent
|
||||
|
||||
Preserve completed speaker transcriptions when another speaker fails, so an
|
||||
ordinary run or resume does not repeat expensive successful work. Separately,
|
||||
allow Go's HTTP transport to replay WhisperX uploads when it encounters a
|
||||
recoverable connection or stream failure.
|
||||
|
||||
The motivating incident exhausted four transcription attempts for one speaker
|
||||
after three other speakers had completed. The final error reported an HTTP/2
|
||||
peer `PROTOCOL_ERROR` and an inability to replay the request body without
|
||||
`Request.GetBody`.
|
||||
|
||||
These are related reliability improvements, not a promise to eliminate all
|
||||
service failures. This document records the target state and scope. The
|
||||
completed implementation sequence is retained in Git history; current behavior
|
||||
is documented in the canonical guides linked below.
|
||||
|
||||
## Pre-implementation Limitations
|
||||
|
||||
The [transcribe stage](../internal/stage-transcribe.md) writes successful
|
||||
responses into the invocation's run directory. It installs canonical transcripts
|
||||
and returns its per-file metadata only after every speaker succeeds. A failure
|
||||
therefore leaves no durable per-speaker progress that ordinary resume can use,
|
||||
even though some completed JSON files may remain on disk.
|
||||
|
||||
The [WhisperX adapter](../integrations/whisperx.md) already retries requests at
|
||||
the application level, reopening audio for each attempt. Its multipart request
|
||||
body is streamed through a pipe and has no replay callback. Transport-level
|
||||
recovery within an attempt cannot reconstruct a consumed body. Providing that
|
||||
capability addresses the replay limitation, not the underlying peer protocol
|
||||
error; persistent failures can still require service or proxy investigation.
|
||||
|
||||
## Targeted End State
|
||||
|
||||
### Durable Per-Speaker Completion
|
||||
|
||||
Each successfully transcribed speaker file is validated, saved, and recorded
|
||||
durably before that work is treated as reusable. The session manifest remains
|
||||
the progress authority. Follow the existing analyze-stage checkpoint pattern
|
||||
without turning speakers into pipeline stages or introducing a general task
|
||||
engine.
|
||||
|
||||
Ordinary execution reconciles the current prepared audio set with recorded
|
||||
speaker results. It reuses valid completed work and schedules failed,
|
||||
unattempted, missing, or obsolete results. A result is not reusable merely
|
||||
because a matching filename exists. Evidence binds it to the speaker/audio
|
||||
identity, audio content, Narratio-visible recognition settings, and the saved
|
||||
transcript's integrity.
|
||||
|
||||
The relevant recognition settings remain the WhisperX service URL and language.
|
||||
Retry count/delay, concurrency, timeout, credentials, and diagnostic locations
|
||||
remain operational settings rather than reasons to discard completed results.
|
||||
Changes to private service models or configuration remain an operator reason
|
||||
to force transcription; Narratio does not inspect the service's private state.
|
||||
|
||||
Changes to individual audio inputs require replacement of affected results,
|
||||
not automatic retranscription of unrelated unchanged speakers. New speakers
|
||||
need transcription; removed speakers do not remain in the current aggregate
|
||||
output set. Records must describe the inputs actually used, not grant reuse to
|
||||
old bytes under a changed identity.
|
||||
|
||||
### Aggregate Completion, Failure, and Force
|
||||
|
||||
The overall stage succeeds only when every currently required speaker has a
|
||||
validated, durably recorded result. Incomplete per-speaker progress does not
|
||||
make the aggregate stage successful or authorize downstream consumption of an
|
||||
incomplete collection. Existing dependent-stage invalidation remains in effect.
|
||||
|
||||
Retain bounded concurrency and the current fail-fast behavior: a speaker
|
||||
failure cancels outstanding work. Results already checkpointed remain reusable
|
||||
after failure, cancellation, or process interruption. A later ordinary run or
|
||||
resume retries the remaining work; it does not need a new CLI command.
|
||||
|
||||
Checkpoint writes must be serialized so concurrently finishing speakers cannot
|
||||
overwrite each other's progress. A failed persistence operation must not
|
||||
advertise an unrecorded result as complete. Previously committed progress remains
|
||||
the recovery authority, and checkpoint errors must be surfaced rather than
|
||||
reported as successful transcription.
|
||||
|
||||
`--force` on transcribe regenerates all currently required speakers instead of
|
||||
reusing their prior completions. Successful replacements are checkpointed too,
|
||||
so an ordinary retry after a failed forced invocation can retain the newly
|
||||
completed work. Old results for speakers not successfully regenerated must not
|
||||
satisfy that unfinished forced replacement on the next ordinary retry.
|
||||
|
||||
This deliberately relaxes the current all-speakers-before-canonical-installation
|
||||
implementation: individual durable results may exist while the stage remains
|
||||
failed or incomplete. The all-speakers-before-stage-success boundary remains.
|
||||
|
||||
### Replayable WhisperX Requests
|
||||
|
||||
Provide `Request.GetBody` so the HTTP transport can obtain a fresh body for the
|
||||
same request. Replay reopens the audio and reproduces the multipart boundary,
|
||||
filename, fields, and framing used by the original request. Independent bodies
|
||||
must not share a consumed reader or mutable read position.
|
||||
|
||||
Preserve bounded-memory streaming rather than buffering entire audio files in
|
||||
memory. Correctly close every original and replay body and its audio resources;
|
||||
preserve source-read errors and cancellation, including partial uploads and
|
||||
early server responses. Successful response handling must not accidentally wait
|
||||
on, or report errors solely from, an abandoned body instead of the replay that
|
||||
produced the response.
|
||||
|
||||
Keep the existing application-level retry count, delay, classification, and
|
||||
per-attempt timeout semantics. Transport replays occur within an application
|
||||
attempt and its context; they are not additional Narratio-configured attempts.
|
||||
Do not add another custom retry loop, silently increase retries, or disable
|
||||
HTTP/2 globally as a substitute for replay support.
|
||||
|
||||
The adapter still validates and installs only successful JSON responses.
|
||||
Request replay does not provide exactly-once server execution: a lost response
|
||||
can cause repeated transcription work, as can existing application retries.
|
||||
No new service-side idempotency protocol is required by this feature.
|
||||
|
||||
## Required Change Areas
|
||||
|
||||
- **Manifest and persistence:** Add transcribe-owned per-speaker progress and
|
||||
evidence, with safe checkpoint updates and preservation through runner failure
|
||||
handling. Review manifest validation, copying, serialization, and existing
|
||||
publish/restore handling wherever the new records pass through those paths.
|
||||
- **Stage execution and reuse:** Reconcile speaker records before scheduling,
|
||||
checkpoint validated completions, rebuild aggregate outputs from the current
|
||||
set, and account for partial progress in ordinary and forced execution.
|
||||
Review successful-stage reuse as well as failed-stage retries so stale audio
|
||||
or missing/corrupt transcript evidence is not bypassed by an aggregate skip.
|
||||
- **Artifact lifecycle:** Use existing path, installation, integrity, and manifest
|
||||
mechanisms. Ensure checkpointed results do not depend on an ephemeral run
|
||||
directory surviving cleanup. Do not introduce a second authoritative ledger
|
||||
or infer completion by scanning abandoned runs.
|
||||
- **HTTP adapter:** Make multipart bodies reproducible and correctly manage
|
||||
every replay's lifetime, without changing the WhisperX HTTP schema or requiring
|
||||
an upstream service change.
|
||||
- **Tests:** Cover per-speaker recovery after a later failure, interruption and
|
||||
checkpoint failure; changed/missing inputs or outputs; force followed by an
|
||||
ordinary retry; concurrent successful completions; and aggregate downstream
|
||||
gating. Extend existing fixtures rather than duplicating analyze's complete
|
||||
test suite. Exercise actual body reconstruction after partial consumption,
|
||||
multipart equivalence, cancellation/resource cleanup, and existing bounded
|
||||
streaming and retry behavior—not just the presence of a callback. Default
|
||||
tests remain offline and use local/fake HTTP boundaries, never paid services.
|
||||
- **Documentation:** Update the canonical
|
||||
[stage guide](../internal/stage-transcribe.md),
|
||||
[manifest guide](../internal/manifest.md),
|
||||
[WhisperX contract](../integrations/whisperx.md),
|
||||
[operations guide](../operations.md), and
|
||||
[troubleshooting guide](../troubleshooting.md) when implemented. Explain
|
||||
partial completion, ordinary retry versus force, and the distinction between
|
||||
request replay limitations and persistent peer protocol failures.
|
||||
|
||||
## Compatibility and Scope Boundaries
|
||||
|
||||
Existing speaker identities, raw transcript formats, and the fixed pipeline
|
||||
order remain unchanged. Existing manifests remain readable, but must not be
|
||||
treated as containing per-speaker evidence they never recorded. Recovery relies
|
||||
on verified recorded evidence, not guessed associations between old transcripts
|
||||
and current audio. No general legacy-migration framework is part of the feature.
|
||||
|
||||
Automatic adoption of unrecorded outputs from previously failed runs is outside
|
||||
this feature. Such files may be recoverable after verifying their inputs, but
|
||||
their presence alone does not prove completion. No recovery/import command,
|
||||
speaker-selection CLI, historical invocation ledger, new service configuration
|
||||
discovery, or broader orchestration refactor is included.
|
||||
|
||||
The feature does not diagnose the remote service/proxy's underlying HTTP/2
|
||||
problem, guarantee recovery from persistent protocol errors, or change the
|
||||
policy for continuing unrelated work after failure.
|
||||
|
||||
## Completion Criteria
|
||||
|
||||
For speakers A, B, C, and D: if A and B are checkpointed, C fails, and D has not
|
||||
completed, ordinary resume retains A and B, retries C, and completes D. No
|
||||
downstream stage receives an incomplete successful transcription collection.
|
||||
Force replaces all four, while an ordinary retry can reuse checkpoints from
|
||||
that forced replacement attempt.
|
||||
|
||||
The HTTP transport can reconstruct the upload after consuming the original
|
||||
body, without whole-file memory buffering, lost source errors, or stranded
|
||||
upload resources. A persistent peer error still fails normally after the
|
||||
configured application attempts, without discarding checkpointed speakers.
|
||||
@@ -133,7 +133,7 @@ notarius:
|
||||
# Optionally select a Notarius ConfigKit overlay when extraction runs. This
|
||||
# is independent of Narratio's selected overlay and may use a different name.
|
||||
# See docs/config.md and docs/integrations/notarius.md for the contracts.
|
||||
# config_profile: downstream-economy
|
||||
# config_overlay: downstream-economy
|
||||
config_path: /usr/local/etc/notarius/config.yml
|
||||
pipeline_id: dnd-session
|
||||
timeout: 3h
|
||||
|
||||
2
go.mod
2
go.mod
@@ -3,7 +3,7 @@ module gitea.maximumdirect.net/eric/narratio
|
||||
go 1.26.0
|
||||
|
||||
require (
|
||||
gitea.maximumdirect.net/eric/ConfigKit v0.4.0
|
||||
gitea.maximumdirect.net/eric/ConfigKit v0.4.2
|
||||
github.com/aws/aws-sdk-go-v2/config v1.32.17
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.19.16
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.101.0
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1,5 +1,5 @@
|
||||
gitea.maximumdirect.net/eric/ConfigKit v0.4.0 h1:fo+vKff3zTGeWqJIA38NtT84b6OUP//9ZmBH3lFuKgk=
|
||||
gitea.maximumdirect.net/eric/ConfigKit v0.4.0/go.mod h1:tYWpsrbLyu05r8+1MapWp5fN6ZrX9I8hU2xEPedYmYk=
|
||||
gitea.maximumdirect.net/eric/ConfigKit v0.4.2 h1:ZMxmv8pOnLtAx2hFTf8Z+pHKUbR89xErkBhwjr4yK24=
|
||||
gitea.maximumdirect.net/eric/ConfigKit v0.4.2/go.mod h1:tYWpsrbLyu05r8+1MapWp5fN6ZrX9I8hU2xEPedYmYk=
|
||||
github.com/aws/aws-sdk-go-v2 v1.41.7 h1:DWpAJt66FmnnaRIOT/8ASTucrvuDPZASqhhLey6tLY8=
|
||||
github.com/aws/aws-sdk-go-v2 v1.41.7/go.mod h1:4LAfZOPHNVNQEckOACQx60Y8pSRjIkNZQz1w92xpMJc=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.10 h1:gx1AwW1Iyk9Z9dD9F4akX5gnN3QZwUB20GGKH/I+Rho=
|
||||
|
||||
@@ -20,9 +20,9 @@ func (f *FakeRunner) Run(ctx context.Context, req RunRequest) (RunResult, error)
|
||||
}
|
||||
copyRequest := req
|
||||
copyRequest.Credentials = append([]configkit.Secret(nil), req.Credentials...)
|
||||
if req.ConfigProfile != nil {
|
||||
profile := *req.ConfigProfile
|
||||
copyRequest.ConfigProfile = &profile
|
||||
if req.ConfigOverlay != nil {
|
||||
profile := *req.ConfigOverlay
|
||||
copyRequest.ConfigOverlay = &profile
|
||||
}
|
||||
copyRequest.References = append([]ReferenceBinding(nil), req.References...)
|
||||
f.Requests = append(f.Requests, copyRequest)
|
||||
|
||||
@@ -27,7 +27,7 @@ type RunRequest struct {
|
||||
Binary string
|
||||
// Credentials are already-resolved environment references selected for Notarius.
|
||||
Credentials []configkit.Secret
|
||||
ConfigProfile *string
|
||||
ConfigOverlay *string
|
||||
ConfigPath string
|
||||
PipelineID string
|
||||
InputPath string
|
||||
|
||||
@@ -72,8 +72,8 @@ func (r *SubprocessRunner) Run(ctx context.Context, req RunRequest) (RunResult,
|
||||
for _, reference := range references {
|
||||
args = append(args, "--reference", reference.Selector+"="+reference.Path)
|
||||
}
|
||||
if req.ConfigProfile != nil {
|
||||
args = append(args, "--config-profile", *req.ConfigProfile)
|
||||
if req.ConfigOverlay != nil {
|
||||
args = append(args, "--config-overlay", *req.ConfigOverlay)
|
||||
}
|
||||
args = append(args, "--json")
|
||||
processResult, err := r.run(ctx, subprocess.RunRequest{
|
||||
|
||||
@@ -118,7 +118,7 @@ func TestSubprocessRunnerMapsCacheControlsToArguments(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSubprocessRunnerMapsConfigProfileToArgumentPair(t *testing.T) {
|
||||
func TestSubprocessRunnerMapsConfigOverlayToArgumentPair(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
supplied bool
|
||||
@@ -133,7 +133,7 @@ func TestSubprocessRunnerMapsConfigProfileToArgumentPair(t *testing.T) {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
req := validRunRequest(t)
|
||||
if test.supplied {
|
||||
req.ConfigProfile = &test.value
|
||||
req.ConfigOverlay = &test.value
|
||||
}
|
||||
var captured sharedsubprocess.RunRequest
|
||||
runner := &SubprocessRunner{run: func(_ context.Context, processReq sharedsubprocess.RunRequest) (sharedsubprocess.RunResult, error) {
|
||||
@@ -147,19 +147,19 @@ func TestSubprocessRunnerMapsConfigProfileToArgumentPair(t *testing.T) {
|
||||
}
|
||||
flagIndex := -1
|
||||
for index, arg := range captured.Args {
|
||||
if arg == "--config-profile" {
|
||||
if arg == "--config-overlay" {
|
||||
flagIndex = index
|
||||
break
|
||||
}
|
||||
}
|
||||
if !test.supplied {
|
||||
if flagIndex >= 0 {
|
||||
t.Fatalf("subprocess args unexpectedly contain config profile: %#v", captured.Args)
|
||||
t.Fatalf("subprocess args unexpectedly contain config overlay: %#v", captured.Args)
|
||||
}
|
||||
return
|
||||
}
|
||||
if flagIndex < 0 || flagIndex+2 >= len(captured.Args) || captured.Args[flagIndex+1] != test.value || captured.Args[flagIndex+2] != "--json" {
|
||||
t.Fatalf("config profile argument boundary = %#v, want flag, exact value, then --json", captured.Args)
|
||||
t.Fatalf("config overlay argument boundary = %#v, want flag, exact value, then --json", captured.Args)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -455,7 +455,7 @@ func TestSubprocessRunnerReturnsProcessFailuresWithoutParsingStdout(t *testing.T
|
||||
req := validRunRequest(t)
|
||||
if test.name == "nonzero" {
|
||||
profile := "missing-profile"
|
||||
req.ConfigProfile = &profile
|
||||
req.ConfigOverlay = &profile
|
||||
}
|
||||
req.Binary = writeShellScript(t, "#!/bin/sh\n"+test.scriptBody)
|
||||
req.Timeout = test.timeout
|
||||
@@ -754,7 +754,7 @@ func TestLoadDiagnosticSummariesValidateBoundsAndTolerateUnknownFields(t *testin
|
||||
|
||||
func TestFakeRunnerCapturesRequestsAndHonorsContextAndError(t *testing.T) {
|
||||
profile := "testing"
|
||||
req := RunRequest{PipelineID: "pipeline", ConfigProfile: &profile, References: []ReferenceBinding{{Selector: "party", Path: "/references/party.json"}}}
|
||||
req := RunRequest{PipelineID: "pipeline", ConfigOverlay: &profile, References: []ReferenceBinding{{Selector: "party", Path: "/references/party.json"}}}
|
||||
want := RunResult{BundleRoot: "/bundle"}
|
||||
fake := &FakeRunner{Result: want}
|
||||
got, err := fake.Run(context.Background(), req)
|
||||
@@ -766,8 +766,8 @@ func TestFakeRunnerCapturesRequestsAndHonorsContextAndError(t *testing.T) {
|
||||
t.Fatalf("fake retained aliased request references: %#v", fake.Requests[0].References)
|
||||
}
|
||||
profile = "changed"
|
||||
if *fake.Requests[0].ConfigProfile != "testing" {
|
||||
t.Fatalf("fake retained aliased config profile: %q", *fake.Requests[0].ConfigProfile)
|
||||
if *fake.Requests[0].ConfigOverlay != "testing" {
|
||||
t.Fatalf("fake retained aliased config overlay: %q", *fake.Requests[0].ConfigOverlay)
|
||||
}
|
||||
|
||||
wantErr := errors.New("configured failure")
|
||||
|
||||
@@ -691,17 +691,17 @@ func TestExtractLifecycleCredentialChangesRemainResumable(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestExtractLifecycleConfigProfileChangesRerunExtractionAndDependents(t *testing.T) {
|
||||
func TestExtractLifecycleConfigOverlayChangesRerunExtractionAndDependents(t *testing.T) {
|
||||
cfg, env, runner := extractionLifecycleFixture(t, true)
|
||||
selected := "inexpensive"
|
||||
cfg.Pipeline.Notarius.ConfigProfile = &selected
|
||||
cfg.Pipeline.Notarius.ConfigOverlay = &selected
|
||||
analyzeRuns := 0
|
||||
plan := extractionLifecyclePlan(t, &analyzeRuns)
|
||||
|
||||
if _, err := executeStages(context.Background(), cfg, plan, RunOptions{Env: env}); err != nil {
|
||||
t.Fatalf("initial executeStages() error = %v", err)
|
||||
}
|
||||
if len(runner.requests) != 1 || runner.requests[0].ConfigProfile == nil || *runner.requests[0].ConfigProfile != selected || analyzeRuns != 1 {
|
||||
if len(runner.requests) != 1 || runner.requests[0].ConfigOverlay == nil || *runner.requests[0].ConfigOverlay != selected || analyzeRuns != 1 {
|
||||
t.Fatalf("initial requests=%#v analyze=%d, want selected extraction and analysis", runner.requests, analyzeRuns)
|
||||
}
|
||||
reused, err := executeStages(context.Background(), cfg, plan, RunOptions{Env: env})
|
||||
@@ -721,12 +721,12 @@ func TestExtractLifecycleConfigProfileChangesRerunExtractionAndDependents(t *tes
|
||||
}
|
||||
|
||||
changed := "experimental"
|
||||
cfg.Pipeline.Notarius.ConfigProfile = &changed
|
||||
cfg.Pipeline.Notarius.ConfigOverlay = &changed
|
||||
rerun, err := executeStages(context.Background(), cfg, plan, RunOptions{Env: env})
|
||||
if err != nil {
|
||||
t.Fatalf("changed-profile executeStages() error = %v", err)
|
||||
}
|
||||
if len(rerun.Executed) != 2 || len(runner.requests) != 2 || runner.requests[1].ConfigProfile == nil || *runner.requests[1].ConfigProfile != changed || analyzeRuns != 2 {
|
||||
if len(rerun.Executed) != 2 || len(runner.requests) != 2 || runner.requests[1].ConfigOverlay == nil || *runner.requests[1].ConfigOverlay != changed || analyzeRuns != 2 {
|
||||
t.Fatalf("changed-profile summary=%#v requests=%#v analyze=%d", rerun, runner.requests, analyzeRuns)
|
||||
}
|
||||
after := loadLifecycleManifest(t, cfg)
|
||||
@@ -741,12 +741,12 @@ func TestExtractLifecycleConfigProfileChangesRerunExtractionAndDependents(t *tes
|
||||
t.Fatalf("changed-profile lifecycle render=%#v analyze=%#v publish=%#v", after.Stages["render"], after.Stages["analyze"], after.Stages["publish"])
|
||||
}
|
||||
|
||||
cfg.Pipeline.Notarius.ConfigProfile = nil
|
||||
cfg.Pipeline.Notarius.ConfigOverlay = nil
|
||||
returned, err := executeStages(context.Background(), cfg, plan, RunOptions{Env: env})
|
||||
if err != nil {
|
||||
t.Fatalf("return-to-base executeStages() error = %v", err)
|
||||
}
|
||||
if len(returned.Executed) != 2 || len(runner.requests) != 3 || runner.requests[2].ConfigProfile != nil || analyzeRuns != 3 {
|
||||
if len(returned.Executed) != 2 || len(runner.requests) != 3 || runner.requests[2].ConfigOverlay != nil || analyzeRuns != 3 {
|
||||
t.Fatalf("return-to-base summary=%#v requests=%#v analyze=%d", returned, runner.requests, analyzeRuns)
|
||||
}
|
||||
final := loadLifecycleManifest(t, cfg)
|
||||
@@ -755,10 +755,10 @@ func TestExtractLifecycleConfigProfileChangesRerunExtractionAndDependents(t *tes
|
||||
}
|
||||
}
|
||||
|
||||
func TestExtractLifecycleConfigProfileFailureClearsCurrentResultAndDependents(t *testing.T) {
|
||||
func TestExtractLifecycleConfigOverlayFailureClearsCurrentResultAndDependents(t *testing.T) {
|
||||
cfg, env, runner := extractionLifecycleFixture(t, true)
|
||||
selected := "inexpensive"
|
||||
cfg.Pipeline.Notarius.ConfigProfile = &selected
|
||||
cfg.Pipeline.Notarius.ConfigOverlay = &selected
|
||||
analyzeRuns := 0
|
||||
plan := extractionLifecyclePlan(t, &analyzeRuns)
|
||||
if _, err := executeStages(context.Background(), cfg, plan, RunOptions{Env: env}); err != nil {
|
||||
@@ -768,7 +768,7 @@ func TestExtractLifecycleConfigProfileFailureClearsCurrentResultAndDependents(t
|
||||
markLifecycleStageSucceeded(t, cfg, "publish")
|
||||
|
||||
changed := "missing-profile"
|
||||
cfg.Pipeline.Notarius.ConfigProfile = &changed
|
||||
cfg.Pipeline.Notarius.ConfigOverlay = &changed
|
||||
runner.failuresRemaining = 1
|
||||
if _, err := executeStages(context.Background(), cfg, plan, RunOptions{Env: env}); err == nil {
|
||||
t.Fatal("changed-profile executeStages() error = nil, want downstream failure")
|
||||
@@ -783,12 +783,12 @@ func TestExtractLifecycleConfigProfileFailureClearsCurrentResultAndDependents(t
|
||||
t.Fatalf("failed changed-profile lifecycle trim=%#v render=%#v analyze=%#v publish=%#v analyzeRuns=%d",
|
||||
failed.Stages["trim"], failed.Stages["render"], failed.Stages["analyze"], failed.Stages["publish"], analyzeRuns)
|
||||
}
|
||||
if len(runner.requests) != 2 || runner.requests[1].ConfigProfile == nil || *runner.requests[1].ConfigProfile != changed {
|
||||
if len(runner.requests) != 2 || runner.requests[1].ConfigOverlay == nil || *runner.requests[1].ConfigOverlay != changed {
|
||||
t.Fatalf("failed request = %#v, want changed selector", runner.requests)
|
||||
}
|
||||
}
|
||||
|
||||
func TestExtractLifecycleRealConfigProfilesSelectNotariusExplicitly(t *testing.T) {
|
||||
func TestExtractLifecycleRealConfigOverlaysSelectNotariusExplicitly(t *testing.T) {
|
||||
seed, env, runner := extractionLifecycleFixture(t, true)
|
||||
workspace := seed.Pipeline.Workspace.Root
|
||||
pipelinePath, campaignPath, sessionPath := writeValidConfigFiles(t, workspace)
|
||||
@@ -822,7 +822,7 @@ func TestExtractLifecycleRealConfigProfilesSelectNotariusExplicitly(t *testing.T
|
||||
t.Fatal(err)
|
||||
}
|
||||
for name, contents := range map[string]string{
|
||||
"testing": "whisperx:\n language: fr\nnotarius:\n config_profile: downstream-economy\n",
|
||||
"testing": "whisperx:\n language: fr\nnotarius:\n config_overlay: downstream-economy\n",
|
||||
"narratio-only": "whisperx:\n language: de\n",
|
||||
"narratio-only-two": "whisperx:\n language: es\n",
|
||||
} {
|
||||
@@ -848,7 +848,7 @@ func TestExtractLifecycleRealConfigProfilesSelectNotariusExplicitly(t *testing.T
|
||||
if _, err := executeStages(context.Background(), testingConfig, plan, RunOptions{Env: env}); err != nil {
|
||||
t.Fatalf("execute testing profile: %v", err)
|
||||
}
|
||||
if len(runner.requests) != 1 || runner.requests[0].ConfigProfile == nil || *runner.requests[0].ConfigProfile != "downstream-economy" {
|
||||
if len(runner.requests) != 1 || runner.requests[0].ConfigOverlay == nil || *runner.requests[0].ConfigOverlay != "downstream-economy" {
|
||||
t.Fatalf("testing profile request = %#v, want explicit differently named downstream selector", runner.requests)
|
||||
}
|
||||
|
||||
@@ -857,7 +857,7 @@ func TestExtractLifecycleRealConfigProfilesSelectNotariusExplicitly(t *testing.T
|
||||
if _, err := executeStages(context.Background(), narratioOnly, plan, RunOptions{Env: env}); err != nil {
|
||||
t.Fatalf("execute Narratio-only profile: %v", err)
|
||||
}
|
||||
if len(runner.requests) != 2 || runner.requests[1].ConfigProfile != nil {
|
||||
if len(runner.requests) != 2 || runner.requests[1].ConfigOverlay != nil {
|
||||
t.Fatalf("Narratio-only profile request = %#v, want no automatic downstream selector", runner.requests)
|
||||
}
|
||||
|
||||
|
||||
@@ -305,7 +305,7 @@ type NotariusConfig struct {
|
||||
Enabled bool `yaml:"enabled" json:"enabled"`
|
||||
Binary string `yaml:"binary" json:"binary"`
|
||||
Credentials []configkit.Secret `yaml:"credentials,omitempty" json:"credentials,omitempty"`
|
||||
ConfigProfile *string `yaml:"config_profile,omitempty" json:"config_profile,omitempty"`
|
||||
ConfigOverlay *string `yaml:"config_overlay,omitempty" json:"config_overlay,omitempty"`
|
||||
Resume bool `yaml:"resume,omitempty" json:"resume,omitempty"`
|
||||
ChunkCache string `yaml:"chunk_cache,omitempty" json:"chunk_cache,omitempty"`
|
||||
ConfigPath string `yaml:"config_path" json:"config_path"`
|
||||
|
||||
@@ -54,7 +54,7 @@ func (cfg NotariusConfig) MarshalYAML() (any, error) {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
Binary string `yaml:"binary"`
|
||||
Credentials []string `yaml:"credentials,omitempty"`
|
||||
ConfigProfile *string `yaml:"config_profile,omitempty"`
|
||||
ConfigOverlay *string `yaml:"config_overlay,omitempty"`
|
||||
Resume bool `yaml:"resume,omitempty"`
|
||||
ChunkCache string `yaml:"chunk_cache,omitempty"`
|
||||
ConfigPath string `yaml:"config_path"`
|
||||
@@ -66,7 +66,7 @@ func (cfg NotariusConfig) MarshalYAML() (any, error) {
|
||||
}
|
||||
return safeNotarius{
|
||||
Enabled: cfg.Enabled, Binary: cfg.Binary, Credentials: secretReferenceNames(cfg.Credentials),
|
||||
ConfigProfile: cfg.ConfigProfile,
|
||||
ConfigOverlay: cfg.ConfigOverlay,
|
||||
Resume: cfg.Resume, ChunkCache: cfg.ChunkCache,
|
||||
ConfigPath: cfg.ConfigPath, PipelineID: cfg.PipelineID, Timeout: cfg.Timeout,
|
||||
WorkingDirectory: cfg.WorkingDirectory, References: cfg.References, Outputs: cfg.Outputs,
|
||||
|
||||
@@ -103,7 +103,7 @@ storage:
|
||||
notarius:
|
||||
enabled: false
|
||||
credentials: [NARRATIO_TEST_NOTARIUS_KEY]
|
||||
config_profile: ""
|
||||
config_overlay: ""
|
||||
`
|
||||
pipelinePath, _ := writeConfigFiles(t, pipelineYAML, testSessionBaseYAML)
|
||||
|
||||
@@ -141,20 +141,20 @@ notarius:
|
||||
}
|
||||
}
|
||||
}
|
||||
if !strings.Contains(string(firstYAML), "config_profile: \"\"\n") {
|
||||
t.Fatalf("effective YAML omitted explicit empty Notarius config profile: %q", firstYAML)
|
||||
if !strings.Contains(string(firstYAML), "config_overlay: \"\"\n") {
|
||||
t.Fatalf("effective YAML omitted explicit empty Notarius config overlay: %q", firstYAML)
|
||||
}
|
||||
var roundTrip struct {
|
||||
Notarius *struct {
|
||||
Credentials []string `yaml:"credentials"`
|
||||
ConfigProfile *string `yaml:"config_profile"`
|
||||
ConfigOverlay *string `yaml:"config_overlay"`
|
||||
} `yaml:"notarius"`
|
||||
}
|
||||
if err := yaml.Unmarshal(firstYAML, &roundTrip); err != nil {
|
||||
t.Fatalf("round-trip effective YAML: %v", err)
|
||||
}
|
||||
if roundTrip.Notarius == nil || roundTrip.Notarius.ConfigProfile == nil || *roundTrip.Notarius.ConfigProfile != "" {
|
||||
t.Fatalf("round-trip config profile = %#v, want explicit empty", roundTrip.Notarius)
|
||||
if roundTrip.Notarius == nil || roundTrip.Notarius.ConfigOverlay == nil || *roundTrip.Notarius.ConfigOverlay != "" {
|
||||
t.Fatalf("round-trip config overlay = %#v, want explicit empty", roundTrip.Notarius)
|
||||
}
|
||||
if len(roundTrip.Notarius.Credentials) != 1 || roundTrip.Notarius.Credentials[0] != "NARRATIO_TEST_NOTARIUS_KEY" {
|
||||
t.Fatalf("round-trip credential reference = %#v, want safe public name", roundTrip.Notarius.Credentials)
|
||||
|
||||
@@ -238,7 +238,14 @@ func TestNotariusCredentialOverlayReplacementAndProvenance(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNotariusConfigProfileComposition(t *testing.T) {
|
||||
func TestNotariusRetiredConfigProfileRejected(t *testing.T) {
|
||||
root := writePipelineFixture(t, t.TempDir(), "pipeline.yml", "whisperx:\n transcribe_url: https://transcription.example.test/transcribe\nnotarius:\n config_profile: testing\n")
|
||||
if _, err := LoadPipelineWithOptions(root, PipelineLoadOptions{}); err == nil {
|
||||
t.Fatal("retired Notarius config_profile field was accepted")
|
||||
}
|
||||
}
|
||||
|
||||
func TestNotariusConfigOverlayComposition(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
baseValue string
|
||||
@@ -250,15 +257,15 @@ func TestNotariusConfigProfileComposition(t *testing.T) {
|
||||
{name: "explicit empty", baseValue: `""`, want: stringPointer("")},
|
||||
{name: "explicit default", baseValue: "default", want: stringPointer("default")},
|
||||
{name: "base named selection", baseValue: "production", want: stringPointer("production")},
|
||||
{name: "profile replaces named selection", baseValue: "production", overlayName: "testing", overlay: "notarius:\n config_profile: inexpensive\n", want: stringPointer("inexpensive")},
|
||||
{name: "profile clears named selection", baseValue: "production", overlayName: "testing", overlay: "notarius:\n config_profile: null\n"},
|
||||
{name: "profile replaces named selection", baseValue: "production", overlayName: "testing", overlay: "notarius:\n config_overlay: inexpensive\n", want: stringPointer("inexpensive")},
|
||||
{name: "profile clears named selection", baseValue: "production", overlayName: "testing", overlay: "notarius:\n config_overlay: null\n"},
|
||||
}
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
rootYAML := "whisperx:\n transcribe_url: https://transcription.example.test/transcribe\nnotarius:\n enabled: false\n"
|
||||
if test.baseValue != "" {
|
||||
rootYAML += " config_profile: " + test.baseValue + "\n"
|
||||
rootYAML += " config_overlay: " + test.baseValue + "\n"
|
||||
}
|
||||
root := writePipelineFixture(t, dir, "pipeline.yml", rootYAML)
|
||||
options := PipelineLoadOptions{}
|
||||
@@ -270,8 +277,8 @@ func TestNotariusConfigProfileComposition(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if cfg.Notarius == nil || !reflect.DeepEqual(cfg.Notarius.ConfigProfile, test.want) {
|
||||
t.Fatalf("config profile = %#v, want %#v", cfg.Notarius.ConfigProfile, test.want)
|
||||
if cfg.Notarius == nil || !reflect.DeepEqual(cfg.Notarius.ConfigOverlay, test.want) {
|
||||
t.Fatalf("config overlay = %#v, want %#v", cfg.Notarius.ConfigOverlay, test.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -12,6 +12,46 @@ import (
|
||||
)
|
||||
|
||||
var markdownLinkPattern = regexp.MustCompile(`\[[^\]]+\]\(([^)]+)\)`)
|
||||
var markdownBackticks = regexp.MustCompile("`+")
|
||||
|
||||
// documentationLinks excludes literal examples enclosed by matching backtick
|
||||
// runs before applying the existing lightweight link check.
|
||||
func documentationLinks(markdown string) [][]string {
|
||||
runs := markdownBackticks.FindAllStringIndex(markdown, -1)
|
||||
text := []byte(markdown)
|
||||
for i := 0; i < len(runs); i++ {
|
||||
width := runs[i][1] - runs[i][0]
|
||||
for j := i + 1; j < len(runs); j++ {
|
||||
if runs[j][1]-runs[j][0] != width {
|
||||
continue
|
||||
}
|
||||
for k := runs[i][0]; k < runs[j][1]; k++ {
|
||||
text[k] = ' '
|
||||
}
|
||||
i = j
|
||||
break
|
||||
}
|
||||
}
|
||||
return markdownLinkPattern.FindAllStringSubmatch(string(text), -1)
|
||||
}
|
||||
|
||||
func TestDocumentationLinksIgnoreCodeExamples(t *testing.T) {
|
||||
for _, example := range []string{
|
||||
"`[Source](COMMIT_URL).`",
|
||||
"``[Source](COMMIT_URL) with a ` character``",
|
||||
"```markdown\n[Source](COMMIT_URL)\n```",
|
||||
} {
|
||||
t.Run(example, func(t *testing.T) {
|
||||
matches := documentationLinks("[before](before.md) " + example + " [after](after.md)")
|
||||
if len(matches) != 2 || matches[0][1] != "before.md" || matches[1][1] != "after.md" {
|
||||
t.Fatalf("links = %#v, want only the surrounding real links", matches)
|
||||
}
|
||||
})
|
||||
}
|
||||
if matches := documentationLinks("unmatched ` [real](real.md)"); len(matches) != 1 || matches[0][1] != "real.md" {
|
||||
t.Fatalf("unmatched backtick hid a real link: %#v", matches)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDocumentationLinksResolve(t *testing.T) {
|
||||
root := repositoryRoot(t)
|
||||
@@ -49,6 +89,33 @@ func TestWoodpeckerWorkflowDependencies(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestVerifyWorkflowUsesFullSuiteWithoutFocusedDuplicates(t *testing.T) {
|
||||
path := filepath.Join(repositoryRoot(t), ".woodpecker", "verify.yml")
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var workflow woodpeckerWorkflow
|
||||
if err := yaml.Unmarshal(data, &workflow); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
tests, ok := workflow.Steps["tests"]
|
||||
if !ok || !containsWorkflowCommand(tests.Commands, "go test ./...") {
|
||||
t.Fatalf("verify workflow lacks the full default suite: %#v", tests)
|
||||
}
|
||||
for name, step := range workflow.Steps {
|
||||
commands := strings.Join(step.Commands, "\n")
|
||||
if strings.Contains(commands, "go test ./internal/doccheck") || strings.Contains(commands, "go test ./internal/config -run") {
|
||||
t.Errorf("verify step %q repeats tests covered by the full suite", name)
|
||||
}
|
||||
}
|
||||
for _, dependency := range []string{"race-tests", "static-analysis", "build"} {
|
||||
if !workflowDependsOn(workflow.Steps, "cross-build", dependency, map[string]bool{}) {
|
||||
t.Errorf("cross-build does not depend on %q", dependency)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestReleaseWorkflowRequiresValidation(t *testing.T) {
|
||||
root := repositoryRoot(t)
|
||||
path := filepath.Join(root, ".woodpecker", "release.yml")
|
||||
@@ -136,7 +203,7 @@ func walkDocumentationLinks(t *testing.T, root, directory string) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, match := range markdownLinkPattern.FindAllStringSubmatch(string(data), -1) {
|
||||
for _, match := range documentationLinks(string(data)) {
|
||||
target := strings.TrimSpace(match[1])
|
||||
if !isLocalDocumentationTarget(target) {
|
||||
continue
|
||||
|
||||
@@ -108,6 +108,8 @@ func TestAssetBuilderBuildsNamedAssetsAndChecksEmbeddedVersion(t *testing.T) {
|
||||
command.Env = append(os.Environ(),
|
||||
"PATH="+binDir+string(os.PathListSeparator)+os.Getenv("PATH"),
|
||||
"GOWORK=/caller/controlled/go.work",
|
||||
"GOFLAGS=-tags=releasecheck",
|
||||
"NARRATIO_RELEASE_EXPECT_GOFLAGS=-tags=releasecheck",
|
||||
"NARRATIO_RELEASE_ASSET_GO_LOG="+goLog,
|
||||
)
|
||||
output, err := command.CombinedOutput()
|
||||
@@ -144,10 +146,20 @@ func TestAssetBuilderBuildsNamedAssetsAndChecksEmbeddedVersion(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
builds := 0
|
||||
for _, line := range strings.Split(strings.TrimSpace(string(goCommands)), "\n") {
|
||||
if !strings.HasPrefix(line, "off ") {
|
||||
t.Fatalf("asset builder Go command did not receive GOWORK=off: %q", line)
|
||||
}
|
||||
if strings.Contains(line, " build ") {
|
||||
builds++
|
||||
if !strings.Contains(line, " build -mod=readonly ") {
|
||||
t.Fatalf("asset builder did not select readonly modules: %q", line)
|
||||
}
|
||||
}
|
||||
}
|
||||
if builds != 3 {
|
||||
t.Fatalf("asset builder ran %d builds, want three: %q", builds, goCommands)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,10 +168,16 @@ func TestCandidateCheckerRejectsMalformedVersionAndReleaseNotes(t *testing.T) {
|
||||
if output, err := fixture.run("v1.2"); err == nil || !strings.Contains(output, "invalid stable version") {
|
||||
t.Fatalf("malformed version error = %v\n%s", err, output)
|
||||
}
|
||||
if err := os.Remove(fixture.notePath); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if output, err := fixture.run("v1.2.3"); err == nil || !strings.Contains(output, "release note must be nonempty") {
|
||||
t.Fatalf("missing note error = %v\n%s", err, output)
|
||||
}
|
||||
|
||||
for _, note := range []string{
|
||||
"# Narratio v1.2.3\n\n## Summary\n\n## Compatibility\n\n## Upgrade\n",
|
||||
"# Narratio v1.2.4\n\n## Summary\n\n## Compatibility\n\n## Upgrade\n\n## Changes\n",
|
||||
"",
|
||||
"# Narratio v1.2.4\n\nA release.\n",
|
||||
} {
|
||||
fixture := newCandidateFixture(t)
|
||||
if err := os.WriteFile(fixture.notePath, []byte(note), 0o644); err != nil {
|
||||
@@ -186,33 +204,10 @@ func TestCandidateCheckerRejectsRepositoryHygieneViolations(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "tracked workspace", want: "tracked workspace file is not allowed",
|
||||
name: "filesystem replacement", want: "filesystem module replacements are not allowed",
|
||||
prepare: func(t *testing.T, fixture *candidateFixture) {
|
||||
path := filepath.Join(fixture.root, "go.work")
|
||||
if err := os.WriteFile(path, []byte("go 1.26.0\n"), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fixture.git("add", "go.work")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "vendor directory", want: "vendor directory is not allowed",
|
||||
prepare: func(t *testing.T, fixture *candidateFixture) {
|
||||
if err := os.Mkdir(filepath.Join(fixture.root, "vendor"), 0o755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "replace directive", want: "replace directives are not allowed",
|
||||
prepare: func(t *testing.T, fixture *candidateFixture) {
|
||||
data, err := os.ReadFile(filepath.Join(fixture.root, "go.mod"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.WriteFile(filepath.Join(fixture.root, "go.mod"), append(data, []byte("replace example.invalid/module => ./module\n")...), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
appendFixtureModuleReplacement(t, fixture, "replace example.invalid/module => ./module\n")
|
||||
fixture.extraEnv = append(fixture.extraEnv, "NARRATIO_RELEASE_LOCAL_REPLACEMENT=example.invalid/module")
|
||||
},
|
||||
},
|
||||
} {
|
||||
@@ -228,14 +223,15 @@ func TestCandidateCheckerRejectsRepositoryHygieneViolations(t *testing.T) {
|
||||
|
||||
func TestCandidateCheckerPropagatesOwnedValidationFailure(t *testing.T) {
|
||||
fixture := newCandidateFixture(t)
|
||||
fixture.extraEnv = append(fixture.extraEnv, "NARRATIO_RELEASE_FAIL_GO=test -race -count=1 ./...")
|
||||
if output, err := fixture.run("v1.2.3"); err == nil || !strings.Contains(output, "failed: go test -race -count=1 ./...") {
|
||||
fixture.extraEnv = append(fixture.extraEnv, "NARRATIO_RELEASE_FAIL_GO=test -mod=readonly -race -count=1 ./...")
|
||||
if output, err := fixture.run("v1.2.3"); err == nil || !strings.Contains(output, "failed: go test -mod=readonly -race -count=1 ./...") {
|
||||
t.Fatalf("validation failure = %v\n%s", err, output)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCandidateCheckerUsesGoWorkOffForOwnedCommands(t *testing.T) {
|
||||
func TestCandidateCheckerSelectsOwnedValidationOnce(t *testing.T) {
|
||||
fixture := newCandidateFixture(t)
|
||||
fixture.extraEnv = append(fixture.extraEnv, "GOFLAGS=-tags=releasecheck", "NARRATIO_RELEASE_EXPECT_GOFLAGS=-tags=releasecheck")
|
||||
if output, err := fixture.run("v1.2.3"); err != nil {
|
||||
t.Fatalf("candidate checker error = %v\n%s", err, output)
|
||||
}
|
||||
@@ -244,7 +240,7 @@ func TestCandidateCheckerUsesGoWorkOffForOwnedCommands(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
lines := strings.FieldsFunc(strings.TrimSpace(string(data)), func(r rune) bool { return r == '\n' })
|
||||
if len(lines) < 9 {
|
||||
if len(lines) != 6 {
|
||||
t.Fatalf("owned command log = %q", data)
|
||||
}
|
||||
for _, line := range lines {
|
||||
@@ -252,20 +248,58 @@ func TestCandidateCheckerUsesGoWorkOffForOwnedCommands(t *testing.T) {
|
||||
t.Fatalf("owned command did not receive GOWORK=off: %q", line)
|
||||
}
|
||||
}
|
||||
for _, want := range []string{
|
||||
want := []string{
|
||||
"off list -m -mod=readonly -f {{if .Replace}}{{if not .Replace.Version}}{{.Path}}{{end}}{{end}} all",
|
||||
"off mod tidy -diff",
|
||||
"off test -count=1 ./...",
|
||||
"off test -race -count=1 ./...",
|
||||
"off vet ./...",
|
||||
"off build ./...",
|
||||
"off test -count=1 ./internal/doccheck",
|
||||
"off test -count=1 ./internal/config -run ^TestExamplesLoadAndValidate$",
|
||||
"off gofmt -l",
|
||||
"off test -mod=readonly -race -count=1 ./...",
|
||||
"off vet -mod=readonly ./...",
|
||||
"off build-release-assets v1.2.3",
|
||||
} {
|
||||
if !containsLogLine(lines, want) {
|
||||
t.Fatalf("owned command log = %q, missing %q", data, want)
|
||||
}
|
||||
for _, prefix := range want {
|
||||
count := 0
|
||||
for _, line := range lines {
|
||||
if strings.HasPrefix(line, prefix) {
|
||||
count++
|
||||
}
|
||||
}
|
||||
if count != 1 {
|
||||
t.Fatalf("owned command %q ran %d times, want once: %q", prefix, count, lines)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestCandidateCheckerAllowsInertModuleInputs(t *testing.T) {
|
||||
fixture := newCandidateFixture(t)
|
||||
if err := os.Mkdir(filepath.Join(fixture.root, "vendor"), 0o755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
writeFixtureFile(t, filepath.Join(fixture.root, "go.work"), "go 1.26.0\n", 0o644)
|
||||
writeFixtureFile(t, filepath.Join(fixture.root, "go.work.sum"), "checksum\n", 0o644)
|
||||
writeFixtureFile(t, filepath.Join(fixture.root, "vendor", "modules.txt"), "# module metadata\n", 0o644)
|
||||
fixture.git("add", ".")
|
||||
if output, err := fixture.run("v1.2.3"); err != nil {
|
||||
t.Fatalf("candidate checker rejected inert workspace/vendor files: %v\n%s", err, output)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCandidateCheckerAllowsVersionedReplacement(t *testing.T) {
|
||||
fixture := newCandidateFixture(t)
|
||||
appendFixtureModuleReplacement(t, fixture, "replace example.invalid/module v1.0.0 => example.invalid/fork v1.0.1\n")
|
||||
if output, err := fixture.run("v1.2.3"); err != nil {
|
||||
t.Fatalf("candidate checker rejected versioned replacement metadata: %v\n%s", err, output)
|
||||
}
|
||||
}
|
||||
|
||||
func appendFixtureModuleReplacement(t *testing.T, fixture *candidateFixture, replacement string) {
|
||||
t.Helper()
|
||||
path := filepath.Join(fixture.root, "go.mod")
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.WriteFile(path, append(data, []byte(replacement)...), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,6 +320,9 @@ set -eu
|
||||
if [ -n "${NARRATIO_RELEASE_ASSET_GO_LOG:-}" ]; then
|
||||
printf '%s %s\n' "${GOWORK:-}" "$*" >> "$NARRATIO_RELEASE_ASSET_GO_LOG"
|
||||
fi
|
||||
if [ -n "${NARRATIO_RELEASE_EXPECT_GOFLAGS:-}" ] && [ "${GOFLAGS:-}" != "$NARRATIO_RELEASE_EXPECT_GOFLAGS" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = env ]; then
|
||||
case $2 in
|
||||
@@ -364,7 +401,7 @@ printf '%s build-release-assets %s\n' "${GOWORK:-}" "$1" >> "$NARRATIO_RELEASE_C
|
||||
writeFixtureFile(t, filepath.Join(root, "go.mod"), "module gitea.maximumdirect.net/eric/narratio\n\ngo 1.26.0\n", 0o644)
|
||||
writeFixtureFile(t, filepath.Join(root, "main.go"), "package narratio\n", 0o644)
|
||||
notePath := filepath.Join(root, "docs", "releases", "v1.2.3.md")
|
||||
writeFixtureFile(t, notePath, "# Narratio v1.2.3\n\n## Summary\n\n## Compatibility\n\n## Upgrade\n\n## Changes\n", 0o644)
|
||||
writeFixtureFile(t, notePath, "# Narratio v1.2.3\n\nA concise release note.\n", 0o644)
|
||||
|
||||
fixture := &candidateFixture{root: root, notePath: notePath, binDir: t.TempDir(), logPath: filepath.Join(t.TempDir(), "commands.log")}
|
||||
writeFixtureFile(t, filepath.Join(fixture.binDir, "go"), fixtureGoShim, 0o755)
|
||||
@@ -414,18 +451,18 @@ func writeFixtureFile(t *testing.T, path, contents string, mode os.FileMode) {
|
||||
}
|
||||
}
|
||||
|
||||
func containsLogLine(lines []string, want string) bool {
|
||||
for _, line := range lines {
|
||||
if strings.HasPrefix(line, want) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const fixtureGoShim = `#!/bin/sh
|
||||
set -eu
|
||||
printf '%s %s\n' "${GOWORK:-}" "$*" >> "$NARRATIO_RELEASE_CHECK_LOG"
|
||||
if [ -n "${NARRATIO_RELEASE_EXPECT_GOFLAGS:-}" ] && [ "${GOFLAGS:-}" != "$NARRATIO_RELEASE_EXPECT_GOFLAGS" ]; then
|
||||
exit 1
|
||||
fi
|
||||
if [ "$1" = list ]; then
|
||||
if [ -n "${NARRATIO_RELEASE_LOCAL_REPLACEMENT:-}" ]; then
|
||||
printf '%s\n' "$NARRATIO_RELEASE_LOCAL_REPLACEMENT"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
if [ "${NARRATIO_RELEASE_FAIL_GO:-}" = "$*" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -48,6 +48,7 @@ func TestReleaseCommandRejectsUnpublishedOrExistingCandidates(t *testing.T) {
|
||||
fixture.extraEnv = append(fixture.extraEnv, "NARRATIO_RELEASE_CHECKER_MODE=fail")
|
||||
fixture.mustFail(t, "release candidate validation failed")
|
||||
fixture.requireNoTag(t)
|
||||
assertCheckerCalls(t, fixture, 1)
|
||||
})
|
||||
t.Run("local tag exists", func(t *testing.T) {
|
||||
fixture := newReleaseFixture(t)
|
||||
@@ -90,6 +91,8 @@ git push -q origin main
|
||||
|
||||
func TestReleaseCommandPushesOnlyTheRecordedLightweightTag(t *testing.T) {
|
||||
fixture := newReleaseFixture(t)
|
||||
writeReleaseFixtureFile(t, filepath.Join(fixture.worktree, ".git", "info", "exclude"), "ignored.tmp\n", 0o644)
|
||||
writeReleaseFixtureFile(t, filepath.Join(fixture.worktree, "ignored.tmp"), "local-only\n", 0o644)
|
||||
candidate := fixture.gitOutput("rev-parse", "HEAD^{commit}")
|
||||
output, err := fixture.run()
|
||||
if err != nil {
|
||||
@@ -113,13 +116,14 @@ func TestReleaseCommandPushesOnlyTheRecordedLightweightTag(t *testing.T) {
|
||||
if got := strings.Fields(fixture.gitOutput("--git-dir", fixture.origin, "for-each-ref", "--format=%(refname)", "refs/heads", "refs/tags")); !slicesEqual(got, []string{"refs/heads/main", "refs/tags/v1.2.3"}) {
|
||||
t.Fatalf("remote refs = %#v", got)
|
||||
}
|
||||
assertCheckerCalls(t, fixture, 1)
|
||||
}
|
||||
|
||||
func TestReleaseCommandKeepsUnpublishedLocalTagAfterPushFailure(t *testing.T) {
|
||||
func TestReleaseCommandRetainsLocalTagAfterUnconfirmedPush(t *testing.T) {
|
||||
fixture := newReleaseFixture(t)
|
||||
writeReleaseFixtureFile(t, filepath.Join(fixture.origin, "hooks", "pre-receive"), "#!/bin/sh\nexit 1\n", 0o755)
|
||||
output, err := fixture.run()
|
||||
if err == nil || !strings.Contains(output, "local tag v1.2.3 was created but not published") {
|
||||
if err == nil || !strings.Contains(output, "tag push for v1.2.3 failed or is unconfirmed") || strings.Contains(output, "release: published") || strings.Contains(output, "not published") {
|
||||
t.Fatalf("push failure = %v\n%s", err, output)
|
||||
}
|
||||
if got := fixture.gitOutput("cat-file", "-t", "refs/tags/v1.2.3"); got != "commit" {
|
||||
@@ -128,12 +132,25 @@ func TestReleaseCommandKeepsUnpublishedLocalTagAfterPushFailure(t *testing.T) {
|
||||
if output, err := runReleaseGit(fixture.worktree, "--git-dir", fixture.origin, "show-ref", "--verify", "refs/tags/v1.2.3"); err == nil {
|
||||
t.Fatalf("remote tag exists after failed push: %s", output)
|
||||
}
|
||||
assertCheckerCalls(t, fixture, 1)
|
||||
}
|
||||
|
||||
func assertCheckerCalls(t *testing.T, fixture *releaseFixture, want int) {
|
||||
t.Helper()
|
||||
data, err := os.ReadFile(fixture.checkerLog)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := len(strings.Fields(string(data))); got != want {
|
||||
t.Fatalf("candidate checker called %d times, want %d: %q", got, want, data)
|
||||
}
|
||||
}
|
||||
|
||||
type releaseFixture struct {
|
||||
worktree string
|
||||
origin string
|
||||
extraEnv []string
|
||||
worktree string
|
||||
origin string
|
||||
checkerLog string
|
||||
extraEnv []string
|
||||
}
|
||||
|
||||
func newReleaseFixture(t *testing.T) *releaseFixture {
|
||||
@@ -154,7 +171,7 @@ func newReleaseFixture(t *testing.T) *releaseFixture {
|
||||
writeReleaseFixtureFile(t, filepath.Join(worktree, "docs", "releases", "v1.2.3.md"), "# Narratio v1.2.3\n", 0o644)
|
||||
writeReleaseFixtureFile(t, filepath.Join(worktree, "README.md"), "fixture\n", 0o644)
|
||||
|
||||
fixture := &releaseFixture{worktree: worktree, origin: origin}
|
||||
fixture := &releaseFixture{worktree: worktree, origin: origin, checkerLog: filepath.Join(root, "checker.log")}
|
||||
fixture.git("init", "-qb", "main")
|
||||
fixture.git("config", "user.email", "releasecheck@example.test")
|
||||
fixture.git("config", "user.name", "Release Check")
|
||||
@@ -176,7 +193,8 @@ func (fixture *releaseFixture) runWith(args ...string) (string, error) {
|
||||
commandArgs := append([]string{filepath.Join(fixture.worktree, "scripts", "release.sh")}, args...)
|
||||
command := exec.Command("sh", commandArgs...)
|
||||
command.Dir = fixture.worktree
|
||||
command.Env = append(os.Environ(), fixture.extraEnv...)
|
||||
command.Env = append(os.Environ(), "NARRATIO_RELEASE_CHECKER_LOG="+fixture.checkerLog)
|
||||
command.Env = append(command.Env, fixture.extraEnv...)
|
||||
output, err := command.CombinedOutput()
|
||||
return string(output), err
|
||||
}
|
||||
@@ -238,6 +256,7 @@ func writeReleaseFixtureFile(t *testing.T, path, contents string, mode os.FileMo
|
||||
|
||||
const releaseCandidateStub = `#!/bin/sh
|
||||
set -eu
|
||||
printf 'called\n' >> "$NARRATIO_RELEASE_CHECKER_LOG"
|
||||
|
||||
case "${NARRATIO_RELEASE_CHECKER_MODE:-success}" in
|
||||
success) ;;
|
||||
|
||||
@@ -146,7 +146,7 @@ func (extractStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (re
|
||||
chunkCache = "refresh"
|
||||
}
|
||||
request := notarius.RunRequest{
|
||||
Binary: resolvedBinary, Credentials: notariusConfig.Credentials, ConfigProfile: notariusConfig.ConfigProfile,
|
||||
Binary: resolvedBinary, Credentials: notariusConfig.Credentials, ConfigOverlay: notariusConfig.ConfigOverlay,
|
||||
ConfigPath: configPath, PipelineID: notariusConfig.PipelineID,
|
||||
InputPath: inputPath, OutputRoot: outputRoot, WorkingDirectory: workingDirectory,
|
||||
ReceiptPath: receiptPath, LogPath: logPath, Timeout: timeout, Resume: resume, ChunkCache: chunkCache, References: referenceBindings,
|
||||
@@ -451,7 +451,7 @@ type fingerprintOutput struct {
|
||||
|
||||
type fingerprintDocument struct {
|
||||
PipelineID string `json:"pipeline_id"`
|
||||
ConfigProfile string `json:"config_profile,omitempty"`
|
||||
ConfigOverlay string `json:"config_overlay,omitempty"`
|
||||
Input artifacts.ExtractionInputIdentity `json:"input"`
|
||||
References []extractReferenceIdentity `json:"references"`
|
||||
Outputs []fingerprintOutput `json:"outputs"`
|
||||
@@ -486,7 +486,7 @@ func extractionFingerprint(
|
||||
return sortedReferences[i].Path < sortedReferences[j].Path
|
||||
})
|
||||
payload, err := json.Marshal(fingerprintDocument{
|
||||
PipelineID: cfg.PipelineID, ConfigProfile: notariusConfigProfileReuseIdentity(cfg.ConfigProfile),
|
||||
PipelineID: cfg.PipelineID, ConfigOverlay: notariusConfigOverlayReuseIdentity(cfg.ConfigOverlay),
|
||||
Input: input, References: sortedReferences, Outputs: outputs,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
@@ -72,8 +72,8 @@ notarius:
|
||||
|
||||
env, m, fake := setupExtractEnv(t)
|
||||
env.Config.Pipeline.Notarius.Credentials = loadedPipeline.Notarius.Credentials
|
||||
configProfile := "inexpensive"
|
||||
env.Config.Pipeline.Notarius.ConfigProfile = &configProfile
|
||||
configOverlay := "inexpensive"
|
||||
env.Config.Pipeline.Notarius.ConfigOverlay = &configOverlay
|
||||
result, err := (extractStage{}).Run(context.Background(), env, m)
|
||||
if err != nil {
|
||||
t.Fatalf("Run() error = %v", err)
|
||||
@@ -106,8 +106,8 @@ notarius:
|
||||
if len(req.Credentials) != 1 || req.Credentials[0].EnvName() != credentialName || !req.Credentials[0].IsResolved() {
|
||||
t.Fatal("request did not retain the loaded Notarius credential reference")
|
||||
}
|
||||
if req.ConfigProfile == nil || *req.ConfigProfile != configProfile {
|
||||
t.Fatalf("request config profile = %#v, want %q", req.ConfigProfile, configProfile)
|
||||
if req.ConfigOverlay == nil || *req.ConfigOverlay != configOverlay {
|
||||
t.Fatalf("request config overlay = %#v, want %q", req.ConfigOverlay, configOverlay)
|
||||
}
|
||||
if result.Metadata["reference_count"] != 0 || len(result.Metadata["references"].([]map[string]any)) != 0 {
|
||||
t.Fatalf("reference metadata = count %#v references %#v", result.Metadata["reference_count"], result.Metadata["references"])
|
||||
@@ -141,8 +141,8 @@ func TestExtractStageAppliesNotariusCacheControlsAndForcePrecedence(t *testing.T
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
env, m, fake := setupExtractEnv(t)
|
||||
configProfile := "inexpensive"
|
||||
env.Config.Pipeline.Notarius.ConfigProfile = &configProfile
|
||||
configOverlay := "inexpensive"
|
||||
env.Config.Pipeline.Notarius.ConfigOverlay = &configOverlay
|
||||
env.Config.Pipeline.Notarius.Resume = test.configuredResume
|
||||
env.Config.Pipeline.Notarius.ChunkCache = test.configuredMode
|
||||
env.Force = test.force
|
||||
@@ -157,8 +157,8 @@ func TestExtractStageAppliesNotariusCacheControlsAndForcePrecedence(t *testing.T
|
||||
if request.Resume != test.wantResume || request.ChunkCache != test.wantMode {
|
||||
t.Fatalf("cache controls = resume %v, mode %q; want resume %v, mode %q", request.Resume, request.ChunkCache, test.wantResume, test.wantMode)
|
||||
}
|
||||
if request.ConfigProfile == nil || *request.ConfigProfile != configProfile {
|
||||
t.Fatalf("config profile = %#v, want %q", request.ConfigProfile, configProfile)
|
||||
if request.ConfigOverlay == nil || *request.ConfigOverlay != configOverlay {
|
||||
t.Fatalf("config overlay = %#v, want %q", request.ConfigOverlay, configOverlay)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1018,7 +1018,7 @@ func TestExtractionFingerprintBaseSelectorsPreservePriorPayloadShape(t *testing.
|
||||
legacyDigest := sha256.Sum256(legacyPayload)
|
||||
want := hex.EncodeToString(legacyDigest[:])
|
||||
for _, profile := range []*string{nil, stringPointerForExtractTest(""), stringPointerForExtractTest("default")} {
|
||||
cfg.ConfigProfile = profile
|
||||
cfg.ConfigOverlay = profile
|
||||
got, err := extractionFingerprint(cfg, input, references)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -1027,7 +1027,7 @@ func TestExtractionFingerprintBaseSelectorsPreservePriorPayloadShape(t *testing.
|
||||
t.Fatalf("base selection fingerprint = %q, want prior no-profile payload digest %q", got, want)
|
||||
}
|
||||
}
|
||||
cfg.ConfigProfile = stringPointerForExtractTest("inexpensive")
|
||||
cfg.ConfigOverlay = stringPointerForExtractTest("inexpensive")
|
||||
named, err := extractionFingerprint(cfg, input, references)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -1055,10 +1055,10 @@ func TestExtractStageResumeValidationAcceptsCurrentImmutableResult(t *testing.T)
|
||||
}
|
||||
}
|
||||
|
||||
func TestExtractStageResumeValidationTracksConfigProfile(t *testing.T) {
|
||||
func TestExtractStageResumeValidationTracksConfigOverlay(t *testing.T) {
|
||||
env, m, _ := setupExtractEnv(t)
|
||||
selected := "inexpensive"
|
||||
env.Config.Pipeline.Notarius.ConfigProfile = &selected
|
||||
env.Config.Pipeline.Notarius.ConfigOverlay = &selected
|
||||
seedSucceededExtractResult(t, env, m)
|
||||
|
||||
validation, err := (extractStage{}).ValidateResume(context.Background(), env, m)
|
||||
@@ -1070,7 +1070,7 @@ func TestExtractStageResumeValidationTracksConfigProfile(t *testing.T) {
|
||||
}
|
||||
|
||||
changed := "experimental"
|
||||
env.Config.Pipeline.Notarius.ConfigProfile = &changed
|
||||
env.Config.Pipeline.Notarius.ConfigOverlay = &changed
|
||||
validation, err = (extractStage{}).ValidateResume(context.Background(), env, m)
|
||||
if err != nil {
|
||||
t.Fatalf("ValidateResume(changed selection) error = %v", err)
|
||||
|
||||
@@ -27,7 +27,7 @@ const notariusIntegrationBinaryEnv = "NARRATIO_TEST_NOTARIUS_BINARY"
|
||||
func TestNotariusCacheReuseIntegration(t *testing.T) {
|
||||
binary := strings.TrimSpace(os.Getenv(notariusIntegrationBinaryEnv))
|
||||
if binary == "" {
|
||||
t.Skipf("set %s to an absolute Notarius v0.7.0-compatible executable to run this integration test", notariusIntegrationBinaryEnv)
|
||||
t.Skipf("set %s to an absolute Notarius v0.8.1-compatible executable to run this integration test", notariusIntegrationBinaryEnv)
|
||||
}
|
||||
if !filepath.IsAbs(binary) {
|
||||
t.Fatalf("%s = %q, want an absolute path", notariusIntegrationBinaryEnv, binary)
|
||||
@@ -235,6 +235,16 @@ pipelines:
|
||||
if err := os.WriteFile(configPath, []byte(content), 0o600); err != nil {
|
||||
t.Fatalf("write Notarius integration config: %v", err)
|
||||
}
|
||||
// Select a real downstream overlay. Disable provider retries so the controlled
|
||||
// failure below tests checkpoint recovery rather than transient HTTP recovery.
|
||||
overlay := "integration"
|
||||
overlayDir := filepath.Join(root, "overlays")
|
||||
if err := os.MkdirAll(overlayDir, 0o700); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.WriteFile(filepath.Join(overlayDir, overlay+".yml"), []byte("promptkit:\n transient_retries: 0\n"), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
transcriptPath := filepath.Join(sessionPathsForEnv(env, runManifest.SessionID).ArtifactsDir, "trimmed.from-manifest.json")
|
||||
setNotariusIntegrationTranscript(t, runManifest, transcriptPath, notariusIntegrationTranscript("session-cache", "Aria casts Cure Wounds."))
|
||||
@@ -242,7 +252,8 @@ pipelines:
|
||||
env.Notarius = notarius.NewSubprocessRunner()
|
||||
env.Config.Pipeline.Notarius = &config.NotariusConfig{
|
||||
Enabled: true, Binary: binary, ConfigPath: configPath, PipelineID: pipelineID,
|
||||
Timeout: "2m", WorkingDirectory: root, ChunkCache: "auto",
|
||||
ConfigOverlay: &overlay,
|
||||
Timeout: "2m", WorkingDirectory: root, ChunkCache: "auto",
|
||||
References: map[string]string{"party": artifactpolicy.SourceInputParty},
|
||||
Outputs: map[string]config.NotariusOutputConfig{
|
||||
"spells_first": {
|
||||
|
||||
@@ -22,16 +22,16 @@ const (
|
||||
type extractSemanticConfig struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
PipelineID string `json:"pipeline_id,omitempty"`
|
||||
ConfigProfile string `json:"config_profile,omitempty"`
|
||||
ConfigOverlay string `json:"config_overlay,omitempty"`
|
||||
References []extractSemanticReference `json:"references"`
|
||||
Outputs []extractSemanticOutput `json:"outputs"`
|
||||
}
|
||||
|
||||
func notariusConfigProfileReuseIdentity(profile *string) string {
|
||||
if profile == nil || *profile == "" || *profile == "default" {
|
||||
func notariusConfigOverlayReuseIdentity(overlay *string) string {
|
||||
if overlay == nil || *overlay == "" || *overlay == "default" {
|
||||
return ""
|
||||
}
|
||||
return *profile
|
||||
return *overlay
|
||||
}
|
||||
|
||||
type extractSemanticReference struct {
|
||||
@@ -85,7 +85,7 @@ func (extractStage) SemanticConfigFingerprint(env *Env) (manifest.SemanticConfig
|
||||
}
|
||||
payload.Enabled = true
|
||||
payload.PipelineID = strings.TrimSpace(cfg.PipelineID)
|
||||
payload.ConfigProfile = notariusConfigProfileReuseIdentity(cfg.ConfigProfile)
|
||||
payload.ConfigOverlay = notariusConfigOverlayReuseIdentity(cfg.ConfigOverlay)
|
||||
for rawSelector, rawSourceID := range cfg.References {
|
||||
selector, err := notariusref.NormalizeSelector(rawSelector)
|
||||
if err != nil {
|
||||
|
||||
@@ -102,7 +102,7 @@ func TestExtractSemanticConfigSensitivityAndOperationalExclusions(t *testing.T)
|
||||
baseFingerprints := make([]manifest.SemanticConfigFingerprint, 0, 3)
|
||||
for _, profile := range []*string{nil, profilePointer(""), profilePointer("default")} {
|
||||
env := downstreamSemanticEnv()
|
||||
env.Config.Pipeline.Notarius.ConfigProfile = profile
|
||||
env.Config.Pipeline.Notarius.ConfigOverlay = profile
|
||||
fingerprint, err := (extractStage{}).SemanticConfigFingerprint(env)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -115,7 +115,7 @@ func TestExtractSemanticConfigSensitivityAndOperationalExclusions(t *testing.T)
|
||||
}
|
||||
}
|
||||
profiled := downstreamSemanticEnv()
|
||||
profiled.Config.Pipeline.Notarius.ConfigProfile = profilePointer("inexpensive")
|
||||
profiled.Config.Pipeline.Notarius.ConfigOverlay = profilePointer("inexpensive")
|
||||
firstProfile, err := (extractStage{}).SemanticConfigFingerprint(profiled)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -130,7 +130,7 @@ func TestExtractSemanticConfigSensitivityAndOperationalExclusions(t *testing.T)
|
||||
if !firstProfile.Equal(unchangedProfile) {
|
||||
t.Fatal("unchanged Notarius selection changed semantic fingerprint")
|
||||
}
|
||||
profiled.Config.Pipeline.Notarius.ConfigProfile = profilePointer("experimental")
|
||||
profiled.Config.Pipeline.Notarius.ConfigOverlay = profilePointer("experimental")
|
||||
secondProfile, err := (extractStage{}).SemanticConfigFingerprint(profiled)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -138,7 +138,7 @@ func TestExtractSemanticConfigSensitivityAndOperationalExclusions(t *testing.T)
|
||||
if firstProfile.Equal(secondProfile) {
|
||||
t.Fatal("named to different named Notarius selection retained semantic fingerprint")
|
||||
}
|
||||
profiled.Config.Pipeline.Notarius.ConfigProfile = nil
|
||||
profiled.Config.Pipeline.Notarius.ConfigOverlay = nil
|
||||
returnedToBase, err := (extractStage{}).SemanticConfigFingerprint(profiled)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -153,7 +153,7 @@ func TestExtractSemanticConfigSensitivityAndOperationalExclusions(t *testing.T)
|
||||
disabledBase.Config.Pipeline.Notarius.Enabled = false
|
||||
disabledNamed := downstreamSemanticEnv()
|
||||
disabledNamed.Config.Pipeline.Notarius.Enabled = false
|
||||
disabledNamed.Config.Pipeline.Notarius.ConfigProfile = profilePointer("ignored")
|
||||
disabledNamed.Config.Pipeline.Notarius.ConfigOverlay = profilePointer("ignored")
|
||||
disabledBaseFingerprint, err := (extractStage{}).SemanticConfigFingerprint(disabledBase)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@@ -73,7 +73,7 @@ for target in linux/amd64 linux/arm64 darwin/arm64; do
|
||||
target_os=${target%%/*}
|
||||
target_arch=${target#*/}
|
||||
asset_path="$output_dir/narratio-$release_version-$target_os-$target_arch"
|
||||
CGO_ENABLED=0 GOOS="$target_os" GOARCH="$target_arch" go build -trimpath -ldflags "$build_flags" -o "$asset_path" ./cmd/narratio
|
||||
CGO_ENABLED=0 GOOS="$target_os" GOARCH="$target_arch" go build -mod=readonly -trimpath -ldflags "$build_flags" -o "$asset_path" ./cmd/narratio
|
||||
if [ "$target_os" = "$host_os" ] && [ "$target_arch" = "$host_arch" ]; then
|
||||
host_asset=$asset_path
|
||||
fi
|
||||
@@ -81,7 +81,7 @@ done
|
||||
|
||||
if [ -z "$host_asset" ]; then
|
||||
temporary_smoke_binary="$output_dir/.narratio-release-version-smoke"
|
||||
CGO_ENABLED=0 go build -trimpath -ldflags "$build_flags" -o "$temporary_smoke_binary" ./cmd/narratio
|
||||
CGO_ENABLED=0 go build -mod=readonly -trimpath -ldflags "$build_flags" -o "$temporary_smoke_binary" ./cmd/narratio
|
||||
host_asset=$temporary_smoke_binary
|
||||
fi
|
||||
|
||||
|
||||
@@ -29,25 +29,14 @@ note_heading=$(sed -n '1p' "$release_note")
|
||||
if [ "$note_heading" != "# Narratio $release_version" ]; then
|
||||
narratio_release_fail "$tool_name" "release note must begin with # Narratio $release_version"
|
||||
fi
|
||||
for required_heading in '## Summary' '## Compatibility' '## Upgrade' '## Changes'; do
|
||||
if ! grep -Fqx "$required_heading" "$release_note"; then
|
||||
narratio_release_fail "$tool_name" "release note is missing required heading: $required_heading"
|
||||
fi
|
||||
done
|
||||
|
||||
if ! grep -Eq '^module[[:space:]]+gitea\.maximumdirect\.net/eric/narratio[[:space:]]*$' go.mod; then
|
||||
narratio_release_fail "$tool_name" 'go.mod must declare module gitea.maximumdirect.net/eric/narratio'
|
||||
fi
|
||||
for workspace_file in go.work go.work.sum; do
|
||||
if git ls-files --error-unmatch "$workspace_file" >/dev/null 2>&1; then
|
||||
narratio_release_fail "$tool_name" "tracked workspace file is not allowed: $workspace_file"
|
||||
fi
|
||||
done
|
||||
if [ -d vendor ]; then
|
||||
narratio_release_fail "$tool_name" 'vendor directory is not allowed'
|
||||
if ! local_replacements=$(GOWORK=off go list -m -mod=readonly -f '{{if .Replace}}{{if not .Replace.Version}}{{.Path}}{{end}}{{end}}' all); then
|
||||
narratio_release_fail "$tool_name" 'failed: go list -m replacement metadata'
|
||||
fi
|
||||
if grep -Eq '^[[:space:]]*replace[[:space:]]' go.mod; then
|
||||
narratio_release_fail "$tool_name" 'go.mod replace directives are not allowed'
|
||||
if [ -n "$local_replacements" ]; then
|
||||
narratio_release_fail "$tool_name" "filesystem module replacements are not allowed: $local_replacements"
|
||||
fi
|
||||
|
||||
narratio_release_go() {
|
||||
@@ -68,12 +57,8 @@ if ! git diff --cached --check; then
|
||||
narratio_release_fail "$tool_name" 'cached whitespace check failed'
|
||||
fi
|
||||
|
||||
narratio_release_go test -count=1 ./...
|
||||
narratio_release_go test -race -count=1 ./...
|
||||
narratio_release_go vet ./...
|
||||
narratio_release_go build ./...
|
||||
narratio_release_go test -count=1 ./internal/doccheck
|
||||
narratio_release_go test -count=1 ./internal/config -run '^TestExamplesLoadAndValidate$'
|
||||
narratio_release_go test -mod=readonly -race -count=1 ./...
|
||||
narratio_release_go vet -mod=readonly ./...
|
||||
|
||||
temporary_assets_dir=$(mktemp -d "${TMPDIR:-/tmp}/narratio-release-candidate.XXXXXX") || narratio_release_fail "$tool_name" 'cannot create temporary asset directory'
|
||||
case $temporary_assets_dir in
|
||||
|
||||
@@ -97,7 +97,7 @@ if [ "$(git rev-parse --verify "refs/tags/$release_version^{commit}")" != "$cand
|
||||
fi
|
||||
|
||||
if ! git push origin "refs/tags/$release_version:refs/tags/$release_version"; then
|
||||
printf 'release: local tag %s was created but not published; inspect it before retrying\n' "$release_version" >&2
|
||||
printf 'release: tag push for %s failed or is unconfirmed; local tag retained; inspect origin before retrying\n' "$release_version" >&2
|
||||
exit 1
|
||||
fi
|
||||
printf 'release: published %s at %s\n' "$release_version" "$candidate_commit"
|
||||
|
||||
Reference in New Issue
Block a user