Traceability: move per-repo settings into traceability.toml
The shared extractor now takes its per-repo taxonomy from a config file rather than CLI flags, so the wrapper shrinks to the one thing it alone knows: the repo root, which the vendored gate cannot infer because its own default resolves inside the submodule. Coverage unchanged at 23/32; the gate reports the scan as '26 (.rs under src, tests)', which is the config being read rather than defaults being guessed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
# Requirement traceability gate for JRay-public-server.
|
||||
#
|
||||
# A thin wrapper over the shared implementation in the `jray-project` submodule.
|
||||
# Everything repo-specific lives here; the tooling itself is identical across all
|
||||
# three components, so a fix to the gate benefits every repo rather than one.
|
||||
# Everything repo-specific lives in `traceability.toml` at the repo root, so this
|
||||
# script only has to point the shared gate at the right tree — and a fix to the
|
||||
# gate benefits every component rather than one.
|
||||
#
|
||||
# scripts/traceability-gate.sh
|
||||
#
|
||||
@@ -12,8 +13,8 @@
|
||||
#
|
||||
# git submodule update --init --recursive
|
||||
#
|
||||
# Environment (passed through to the shared gate):
|
||||
# MIN_COVERAGE minimum overall coverage percent
|
||||
# Environment (passed through):
|
||||
# MIN_COVERAGE override the threshold in traceability.toml
|
||||
# ALLOW_ORPHANS set to 1 to report orphan tags without failing
|
||||
|
||||
set -eu
|
||||
@@ -28,31 +29,8 @@ if [ ! -f "$VENDOR/scripts/traceability/traceability-gate.sh" ]; then
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Why each override is needed, since omitting any of them fails silently in a
|
||||
# way that looks like "no work done" rather than "misconfigured":
|
||||
#
|
||||
# REPO_ROOT the shared gate defaults to two levels above itself, which is
|
||||
# inside the submodule once vendored.
|
||||
# TYPES this repo's register uses UR/DR. The default is the extraction
|
||||
# pipeline's AR/DP/IR/GR/VR, under which the register parses to
|
||||
# ZERO requirements.
|
||||
# SUFFIXES this repo is Rust. The default is C++/Python, under which the
|
||||
# source tree scans to ZERO files.
|
||||
# SYSTEM_SPEC the PR/SR requirements live in the project home, which is the
|
||||
# submodule itself — so it ships with the tool that reads it.
|
||||
#
|
||||
# MIN_COVERAGE stays 0 until the TRACES annotation pass lands. That does not
|
||||
# make the gate toothless: orphan tags, a >100% ratio, a register parsing to
|
||||
# nothing and an empty source scan are all hard failures from day one. Raise it
|
||||
# as tags land, and treat every raise as a ratchet.
|
||||
REPO_ROOT="$REPO_ROOT" \
|
||||
REQUIREMENTS="$REPO_ROOT/docs/requirements.md" \
|
||||
SYSTEM_SPEC="$VENDOR/SPEC.md" \
|
||||
TYPES="UR,DR" \
|
||||
SUFFIXES=".rs" \
|
||||
SCAN_ROOTS="src,tests" \
|
||||
MIN_COVERAGE="${MIN_COVERAGE:-0}" \
|
||||
ALLOW_ORPHANS="${ALLOW_ORPHANS:-0}" \
|
||||
TRACES_JSON="${TRACES_JSON:-$REPO_ROOT/traces-report.json}" \
|
||||
TRACES_MD="${TRACES_MD:-$REPO_ROOT/docs/traceability.md}" \
|
||||
exec sh "$VENDOR/scripts/traceability/traceability-gate.sh"
|
||||
# REPO_ROOT is the one thing the shared gate cannot infer: its own default is
|
||||
# two levels above itself, which is inside the submodule once vendored. The
|
||||
# taxonomy, languages and thresholds all come from traceability.toml, which the
|
||||
# extractor discovers from this root.
|
||||
REPO_ROOT="$REPO_ROOT" exec sh "$VENDOR/scripts/traceability/traceability-gate.sh" "$@"
|
||||
|
||||
Vendored
+1
-1
Submodule scripts/vendor/jray-project updated: 041961c8c6...17106f3370
Reference in New Issue
Block a user