Skip to content

feat(config): versioned project configuration for v0.8.0 - #29

Merged
ikelaiah merged 3 commits into
mainfrom
feat/v0.8.0-project-configuration
Sep 19, 2026
Merged

ikelaiah merged 3 commits into
mainfrom
feat/v0.8.0-project-configuration

Conversation

@ikelaiah

Copy link
Copy Markdown
Owner

Summary

Implements the v0.8.0 milestone: commit one pasweave.json, rebuild with --config=pasweave.json, and reproduce the build from model metadata.

Changes

Versioned configuration format (PasWeave.Config, 24 unit tests)

  • pasweave.json, "version": 1, strictly declarative — no scripts, plugins, or remote references.
  • Unknown keys, wrong types, unsupported versions, invalid values, absolute paths, and traversal escaping the config directory are rejected with key-named errors (exit code 2).
  • Covers source, output, comments, visibility, project title/mark/theme, repository/source-link settings, discovery globs, compiler paths/defines/targets/build mode/package paths, and coverage thresholds.

Precedence and CLI integration

  • --config is pre-scanned and applied before option parsing, so explicit CLI values override the file (defaults < config < CLI).
  • Any CLI instance of a repeatable option (--include, --exclude, --unit-path, --include-path, --define, --package-path) replaces the configured list; --no-recursive and --visibility=public|all override config booleans/policies.
  • The config file is part of the incremental input fingerprint, and the build summary names the configuration used.

Visibility policy

  • visibility: "public" (default) preserves existing behavior exactly; "all" documents private and strict-private declarations, with coverage and the symbol index following the same population.
  • Applied through PasWeave.Render.Support (policy lives in the model), so all renderers and validation stay consistent.

Reproducibility

  • api-model.json records configurationSource and the effective normalized configuration text (the same text hashed into the fingerprint).

Docs

  • New docs/project-configuration.md (schema, precedence, path rules, examples), linked from the README and docs index; generated-output.md and CHANGELOG.md updated; --help lists the new options.

Verification

  • make test passes: CLI suite (config-only build, config-relative output, precedence, model exposure, unknown-key/missing-file/invalid-visibility rejection, private rendering under visibility=all) plus the functional suites and 24 config unit cases.
  • Checked-in example goldens are byte-identical (no config, default visibility).
  • scripts/check-docs-links.ps1 passes (63 files).

Roadmap

All v0.8.0 exit criteria are met. Release prep (version bump to 0.8.0, release note, tag) is a separate follow-up after this merges.

Add PasWeave.Config with a strict pasweave.json loader: version 1 schema,
unknown-key and type rejection, validated theme/comments/targets/defines/
coverage values, and relative-path rules that reject absolute paths and
parent traversal escaping the configuration directory. Options are exposed
through TProjectConfig with presence flags where empty is meaningful.

Covered by tests/PasWeave.ConfigTests.pas with a full valid document, a
minimal document, and 22 rejection cases.
Load --config before option parsing so explicit CLI values override the
file, with any CLI instance of a repeatable option replacing the configured
list. Add --no-recursive and --visibility=public|all, include the config file
in the input fingerprint, record the effective configuration in api-model.json
and the fingerprint, and report the configuration file in the build summary.
Config failures exit with code 2.

The visibility policy lives in the model, is applied through
PasWeave.Render.Support, and defaults to the public API so existing output is
unchanged. CLI and config tests cover config-only builds, precedence,
config-relative output, model exposure, strict rejection, and rendering
private members under visibility=all.
Document the pasweave.json schema, precedence, path rules, list-replacement
semantics, visibility policy, reproducibility fields, validation errors, and
usage examples. Link the guide from the README documentation table and the
docs index, and record the new model fields and changelog entries.
@ikelaiah ikelaiah self-assigned this Sep 19, 2026
@ikelaiah ikelaiah added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 19, 2026
@ikelaiah
ikelaiah merged commit 92a84a0 into main Sep 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant