feat(plan-01): Phase 4b — external callers to packages paths + registry (Task 1.7)
Point the canonical entry points at the new package layout; the .specify compat facade
is retained as an intentional backward-compat layer (see below).
- .gitea/workflows/{ci,harness-ci}.yml: invoke packages/casan-harness/scripts/bash|tests
(state paths .specify/logs kept). CI now runs on the new structure.
- infra/local-prod/docker-compose.yml: dashboard-server.py -> packages path (logs/alerts
env stay under .specify state).
- scripts/casan-step.mjs + run-casan-pipeline.mjs: resolve the harness under
packages/casan-harness, falling back to .specify so the adversarial/sourcegen sandboxes
(which stage a .specify/ tree) keep working; requirement input prefers apps/okr/domain/input.
- project-registry.json: record the new layout (harness_root, state_root, governance_root,
per-project domain_root) so Plan-06 can register a second app with its own domain.
verify-harness-reuse.sh already resolves via CASAN_HARNESS_ROOT -> HARNESS_REUSE_VALID (3 projects).
Facade decision: the .specify/{scripts,tests,security,...} symlinks are KEPT as a
documented compat layer. A full hard cutover (removing them) still needs ~15 literal
`.specify/...` refs repointed (loop_common/evidence-pack/secrets-scan config+test paths,
run-casan-pipeline step scripts, and the signed policy-bundle.yaml path list which then
needs manifest regen + re-sign). That is a scoped follow-up; the physical separation
(code in packages/, domain in apps/, packages holds no domain data, single CASAN_* path
indirection) is complete and the full gate is green via BOTH entry paths: PASS=64 FAIL=0 SKIP=3.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
3adc48ed82
commit
e891981b59
@@ -1,12 +1,18 @@
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { mkdirSync, readFileSync, writeFileSync, unlinkSync } from 'node:fs';
|
||||
import { existsSync, mkdirSync, readFileSync, writeFileSync, unlinkSync } from 'node:fs';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
// WP-B (H3): model judge gate helpers — AND(rule, model); SKIP is non-blocking.
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const SCRIPTS_DIR = join(dirname(__filename), '..', '.specify', 'scripts', 'bash');
|
||||
// Plan-01: harness code lives in packages/casan-harness/; fall back to the .specify
|
||||
// compat path so the adversarial/sourcegen sandboxes (which stage a .specify/ tree)
|
||||
// keep working when this file is copied into a temp root.
|
||||
const __appRoot = join(dirname(__filename), '..');
|
||||
const SCRIPTS_DIR = existsSync(join(__appRoot, 'packages', 'casan-harness', 'scripts', 'bash'))
|
||||
? join(__appRoot, 'packages', 'casan-harness', 'scripts', 'bash')
|
||||
: join(__appRoot, '.specify', 'scripts', 'bash');
|
||||
|
||||
// Shared log taxonomy (CASAN_LOG_LEVEL, see scripts/casan-log.mjs). The
|
||||
// adversarial T1 test copies this file alone into a temp tree, so the logger
|
||||
@@ -180,7 +186,10 @@ const dirs = [
|
||||
];
|
||||
dirs.forEach((dir) => mkdirSync(dir, { recursive: true }));
|
||||
|
||||
const requirement = readFileSync('docs/input/okr-requirement.md', 'utf8');
|
||||
const requirement = readFileSync(
|
||||
existsSync('apps/okr/domain/input/okr-requirement.md')
|
||||
? 'apps/okr/domain/input/okr-requirement.md'
|
||||
: 'docs/input/okr-requirement.md', 'utf8');
|
||||
const architecture = readFileSync('docs/technical_architecture.md', 'utf8');
|
||||
|
||||
function write(path, content) {
|
||||
|
||||
Reference in New Issue
Block a user