feat: Railiance package and deploy (HARNESS-WP-0001-T06)

Container image, k8s namespace/deployment/smoke job, host venv install path,
and deterministic agent-harness smoke (sandbox commit+push+hub) for remote
verification without Claude Code on the worker host.
This commit is contained in:
tegwick 2026-07-18 10:48:44 +02:00
parent 4144eba160
commit 67f1791491
15 changed files with 520 additions and 1 deletions

View file

@ -106,6 +106,27 @@ def main(argv: list[str] | None = None) -> int:
sub.add_parser("profiles", help="List named tool profiles")
smoke = sub.add_parser(
"smoke",
help="Deterministic Railiance smoke: commit SMOKE.md, optional push, hub event",
)
smoke.add_argument(
"--target-repo",
help="Existing git checkout (default: clone executor-sandbox under --work-dir)",
)
smoke.add_argument(
"--work-dir",
default="~/work/executor-sandbox",
help="Clone destination when --target-repo is omitted",
)
smoke.add_argument(
"--remote",
default="ssh://git@forgejo-agent-harness/coulomb/executor-sandbox.git",
help="Git remote for sandbox clone",
)
smoke.add_argument("--no-hub", action="store_true", help="Skip hub reporting")
smoke.add_argument("--no-push", action="store_true", help="Skip git push after commit")
args = parser.parse_args(argv)
if args.command == "validate":
@ -114,6 +135,49 @@ def main(argv: list[str] | None = None) -> int:
if args.command == "profiles":
return _cmd_profiles(args)
if args.command == "smoke":
from agent_harness.smoke import ensure_sandbox_clone, run_smoke
if args.target_repo:
repo = Path(args.target_repo).expanduser().resolve()
else:
try:
repo = ensure_sandbox_clone(
Path(args.work_dir).expanduser(),
remote=args.remote,
)
except Exception as exc:
print(f"smoke clone failed: {exc}", file=sys.stderr)
return 2
try:
smoke_result = run_smoke(
repo,
report_to_hub=not args.no_hub,
push=not args.no_push,
)
except Exception as exc:
print(f"smoke failed: {exc}", file=sys.stderr)
return 1
print(
json.dumps(
{
"ok": smoke_result.run.ok and (
smoke_result.pushed or args.no_push
),
"committed": smoke_result.run.committed,
"pushed": smoke_result.pushed,
"head_after": smoke_result.run.head_after,
"tool_profile": smoke_result.run.tool_profile,
"reason": smoke_result.run.reason,
"push_reason": smoke_result.push_reason,
"target_repo": str(repo),
},
indent=2,
)
)
ok = smoke_result.run.ok and (smoke_result.pushed or args.no_push)
return 0 if ok else 1
if args.command == "mail-scan":
from agent_harness.mailscan import run_mail_scan