Skip to content

Commit bfd7658

Browse files
mswilkisonclaude
andcommitted
extraction: apply allowlisted-divergence transformations to signer scripts
Per extraction plan v38 §4.4, allowlisted-divergence files require content normalization for the canonical context. This commit applies the transformations declared in the source manifest for the 2 signer- side allowlisted-divergence entries. Transformations - pkg/tbtc/signer/scripts/formal/check_roast_attempt_context_vectors.mjs: Rewrite vector path from `docs/frost-migration/test-vectors/roast-attempt-context-v1.json` to canonical signer layout `test/vectors/roast-attempt-context-v1.json` (both relative to rootDir which is two levels up from the script location; in canonical context that's pkg/tbtc/signer/) - pkg/tbtc/signer/scripts/formal/run_tla_models.sh: Rewrite MODEL_DIR default from `$ROOT_DIR/docs/frost-migration/formal-verification/models` to canonical signer layout `$ROOT_DIR/docs/formal/models` Plus MODELS_PATH env-var override for alternate environments (CI matrices, local dev trees). ROOT_DIR is unchanged (`$(dirname $BASH_SOURCE)/../..` resolves to pkg/tbtc/signer/ here). Verification - Both files retain identical behavior to their monorepo counterparts when invoked from canonical signer layout - Comments added documenting the path normalization with reference back to the source manifest's allowlisted-divergence status Recompute expectedTargetSha256 for both entries in the source manifest and collect dual signoff before merge per plan v38 §4.2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 335ce60 commit bfd7658

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

pkg/tbtc/signer/scripts/formal/check_roast_attempt_context_vectors.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@ const VECTOR_SCHEMA_VERSION = "roast-attempt-context-v1"
1212

1313
const scriptDir = path.dirname(fileURLToPath(import.meta.url))
1414
const rootDir = path.resolve(scriptDir, "../..")
15+
// Path normalization (allowlisted-divergence per source manifest):
16+
// canonical signer layout places the ROAST attempt context vector at
17+
// `<rootDir>/test/vectors/roast-attempt-context-v1.json` where rootDir
18+
// is `pkg/tbtc/signer/`. Monorepo source path was
19+
// `docs/frost-migration/test-vectors/roast-attempt-context-v1.json`
20+
// relative to monorepo root.
1521
const vectorsPath = path.join(
1622
rootDir,
17-
"docs/frost-migration/test-vectors/roast-attempt-context-v1.json"
23+
"test/vectors/roast-attempt-context-v1.json"
1824
)
1925

2026
const fail = (message) => {

pkg/tbtc/signer/scripts/formal/run_tla_models.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
set -euo pipefail
33

44
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
5-
MODEL_DIR="$ROOT_DIR/docs/frost-migration/formal-verification/models"
5+
# Path normalization (allowlisted-divergence per source manifest):
6+
# canonical signer layout places TLA+ models at
7+
# `<ROOT_DIR>/docs/formal/models` (where ROOT_DIR = pkg/tbtc/signer/).
8+
# Monorepo source path was `docs/frost-migration/formal-verification/models`
9+
# relative to monorepo root. Override via MODELS_PATH env var for
10+
# alternate environments.
11+
MODEL_DIR="${MODELS_PATH:-$ROOT_DIR/docs/formal/models}"
612
TLA_TOOLS_VERSION="${TLA_TOOLS_VERSION:-v1.8.0}"
713
TLA_TOOLS_JAR="${TLA_TOOLS_JAR:-/tmp/tla2tools-${TLA_TOOLS_VERSION}.jar}"
814
TLA_TOOLS_URL="${TLA_TOOLS_URL:-https://github.com/tlaplus/tlaplus/releases/download/${TLA_TOOLS_VERSION}/tla2tools.jar}"

0 commit comments

Comments
 (0)