Skip to content

Port run_dir binding, log confinement, delivery adopt and check prerequisites - #6

Merged
sangyeT merged 2 commits into
mainfrom
claude/upstream-monorepo-features
Sep 30, 2026
Merged

sangyeT merged 2 commits into
mainfrom
claude/upstream-monorepo-features

Conversation

@sangyeT

@sangyeT sangyeT commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Summary

This ports generic features from the monorepo's older Kizen Stack, so that the monorepo can move to SStack without losing behaviour.

  • {run_dir} placeholder: a custom check's command can write outputs into its own run directory. Reuse is refused with run_directory_outputs_not_reusable.
  • Verification log confinement: check logs must be singly linked regular files under artifacts/sstack/<run>/. The gate refuses symlinks, hard links, .. and linked artifact roots, and binds {run_dir} from each check's own log before comparing commands.
  • delivery adopt: records a PR that was merged outside the controller for a merge_ready packet. It needs allow_merge, the remote head and base, and a merged state with a merge SHA.
  • Custom-check prerequisites:
    • min_python (for example "3.12") and requires (paths relative to the check's cwd, confined to the repo).
    • Enforced by doctor, by verify blocking and by the reuse readiness check, with reasons python_M_m_required and required_path_missing:<path>.
  • Stack tests: they now also hold in repositories whose installed projects.json is customized. Previously two tests assumed SStack's own registry and failed after install.

Verification

  • verify changed --base origin/main --jobs 2 passed (docs, stack and stack-lint).
  • The ported delivery tests fail against the old delivery.py, which shows they detect the missing behaviour.
  • The installed copy was also run in solutions-project-monorepo with its customized registry: the stack suite and all product suites passed there.

Review

One independent review found nothing blocking. Optional findings are left as follow-ups:

  • The log could be hashed through an fd opened with O_NOFOLLOW rather than read by path again.
  • Each check's log could be tied to the report's own run directory.
  • requires paths could be re-confined at run time.
  • projects.json is parsed again for every check.

The README gap it found on log placement is fixed here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HSV4zUy6rF1vgHFSyUmuva


Generated by Claude Code

…quisites

- control.py: {run_dir} placeholder bound per check by verify(); checks using
  it are never reused (run_directory_outputs_not_reusable).
- delivery.py: confine verification logs to artifacts/sstack/<run>/<file>,
  refusing absolute, parent, symlinked-root, out-of-run and hard-linked logs;
  the gate binds {run_dir} from each check's own log. Add Store.adopt and the
  adopt subcommand for a PR merged at the reviewed head before begin.
- registry.py: optional min_python and requires custom-check fields, strictly
  validated and reported as readiness reasons by doctor and verify.
- Docs and ported/new tests for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HSV4zUy6rF1vgHFSyUmuva
test_absent_suites pins the built-in suites, and the default-registry
test skips when the installed projects.json is not SStack's own. Document
the check log placement the gate now requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HSV4zUy6rF1vgHFSyUmuva
@sangyeT
sangyeT merged commit 20cc1e8 into main Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants