scar-cli 0.34.0__tar.gz → 0.36.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.github/workflows/ci.yml +10 -2
- scar_cli-0.36.0/.github/workflows/scar-review-queue.yml +21 -0
- scar_cli-0.36.0/.github/workflows/scar.yml +144 -0
- scar_cli-0.36.0/.release-please-manifest.json +3 -0
- scar_cli-0.34.0/.scars/candidates/scar-files-have-one-reader.md → scar_cli-0.36.0/.scars/0032-scar-files-have-one-reader.landmine.md +6 -2
- scar_cli-0.36.0/.scars/candidates/a-scar-rewrite-carries-its-own-note.md +42 -0
- scar_cli-0.36.0/.scars/candidates/cascade-execution-id-is-not-an-edit-id.md +33 -0
- scar_cli-0.36.0/.scars/candidates/lint-judges-an-act-only-where-a-command-can-clear-it.md +38 -0
- scar_cli-0.36.0/.scars/candidates/release-please-cannot-write-workflow-files.md +32 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/CHANGELOG.md +23 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/PKG-INFO +25 -12
- {scar_cli-0.34.0 → scar_cli-0.36.0}/README.md +24 -11
- {scar_cli-0.34.0 → scar_cli-0.36.0}/SPEC.md +59 -15
- scar_cli-0.36.0/action.yml +54 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/plugin/hooks/run.sh +6 -3
- {scar_cli-0.34.0 → scar_cli-0.36.0}/plugin/plugin.json +1 -1
- {scar_cli-0.34.0 → scar_cli-0.36.0}/pyproject.toml +1 -1
- {scar_cli-0.34.0 → scar_cli-0.36.0}/release-please-config.json +4 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/cascade.py +14 -1
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/cli.py +90 -51
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/codex.py +8 -14
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/hooks.py +91 -16
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/lint.py +22 -10
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/model.py +59 -1
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/orphan.py +8 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/renames.py +64 -26
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/signedpromote.py +14 -10
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/store.py +62 -36
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/verify.py +2 -2
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_action_yml.py +14 -3
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_anchor_kind.py +2 -2
- scar_cli-0.36.0/tests/test_call_signals.py +213 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_cli.py +10 -25
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_codex.py +3 -0
- scar_cli-0.36.0/tests/test_docs.py +354 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_hook_failures.py +40 -2
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_hooks.py +10 -10
- scar_cli-0.36.0/tests/test_lifecycle_policy.py +344 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_lint_downgrade.py +12 -2
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_matched_by.py +4 -4
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_plugin.py +20 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_renames.py +64 -127
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_resign.py +8 -4
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_scar_reader.py +2 -2
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_sign_in_place.py +23 -2
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_signing_contract.py +24 -5
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_terminal_plain_parity.py +2 -2
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_verdict_observability.py +2 -1
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_write_gate.py +77 -5
- {scar_cli-0.34.0 → scar_cli-0.36.0}/uv.lock +1 -1
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/docs/agents.md +56 -46
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/docs/concepts.md +8 -6
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/docs/quickstart.md +1 -0
- scar_cli-0.34.0/.github/workflows/scar-review-queue.yml +0 -49
- scar_cli-0.34.0/.release-please-manifest.json +0 -3
- scar_cli-0.34.0/action.yml +0 -57
- scar_cli-0.34.0/tests/test_docs.py +0 -76
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.claude-plugin/marketplace.json +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.github/workflows/docs.yml +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.github/workflows/pr-validation.yml +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.github/workflows/release.yml +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.gitignore +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.pre-commit-config.yaml +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.pre-commit-hooks.yaml +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0001-git-grep-ere-pitfalls.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0002-agent-direct-hook-install.deadend.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0003-installer-binds-to-active-venv-scar.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0004-promote-roundtrip-drops-expires-evidence.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0005-history-rewrite-orphans-commit-evidence.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0006-yaml-pattern-anchor-over-escaping.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0007-release-please-config-change-skips-open-pr.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0008-rich-output-nontty-must-bypass-rich.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0009-anchor-survival-harness-measures-symbol-not-path-anchors.deadend.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0010-git-returncode-128-vs-empty-tracked-set.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0011-lint-compile-check-lets-redos-anchors-hang-hotpath.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0012-firing-log-readers-need-blanket-guards.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0013-docusaurus-future-v4-requires-faster-dep.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0014-inject-flag-dest-collides-with-subcommand-dispatch.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0015-zero-checkruns-means-approval-gate-not-workflow-bug.deadend.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0016-hook-ownership-must-be-kind-scoped.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0017-codex-pretool-context-can-replay-apply-patch.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0018-cli-subparsers-register-through-_add-wrapper.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0019-token-in-scar-body-cannot-prove-hook-delivery.deadend.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0020-one-directional-health-check-leaves-flattering-direction-unwatched.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0021-posttool-fix-in-hooks-does-not-reach-codex-or-cascade.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0022-codex-hook-delivery-needs-user-file-and-trust.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0023-cascade-block-exit-collides-with-argparse.fence.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0024-host-detection-must-not-read-the-process-home.deadend.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0025-one-plugin-hook-manifest-two-hosts-two-root-variables.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0026-path-anchor-breadth-drives-the-review-due-threshold.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0027-slug-and-display-cleaning-are-different-jobs.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0028-violation-evidence-must-not-persist-raw-edits.fence.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0029-compliance-pools-by-repo-and-id.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0030-presence-signer-input-canonical-subset.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/0031-rich-values-never-in-markup.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/README.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/candidates/.gitkeep +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/.scars/template.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/AGENTS.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/CONTRIBUTING.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/IDEA.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/LICENSE +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/ROADMAP.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/SCAR-FORMAT.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/STRESS-TEST.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/codecov.yml +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/anchor-survival/PROTOCOL.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/anchor-survival/RESULTS.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/anchor-survival/long_replay.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/anchor-survival/replay.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/anchor-survival/replay_shipped.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/anchor-survival/test_replay_shipped.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/auto-authorship/FINDINGS.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/auto-authorship/PROTOCOL.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/fence-honor/.gitignore +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/fence-honor/PROTOCOL.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/fence-honor/RESULTS.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/fence-honor/fixture/.scars/0001-vendor-retry-window.fence.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/fence-honor/fixture/.scars/0002-evicting-session-store.deadend.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/fence-honor/fixture/.scars/0003-export-column-order.landmine.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/fence-honor/fixture/README.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/fence-honor/fixture/payments/retry.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/fence-honor/fixture/reports/export.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/fence-honor/fixture/services/sessions.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/fence-honor/grade.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/harvest/PROTOCOL.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/experiments/harvest/harvest.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/hook/scar-hooks.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/plugin/skills/scar-authoring/SKILL.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/plugin/skills/scar-authoring/assets/template.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/__init__.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/agent.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/atomic.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/clock.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/config.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/draftcheck.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/evidence.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/firing_log.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/gc.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/harvest.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/hosts.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/installer.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/match.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/mcp.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/output.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/presence.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/reanchor.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/record.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/render.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/review.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/skills/scar-authoring/SKILL.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/skills/scar-authoring/assets/template.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/symbols.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/src/scar/violation_evidence.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/conformance_fetch.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/conformance_support.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/conftest.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/fixtures/conformance/promote.json +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/fixtures/conformance/regenerate.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/presence_fakes.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_act_line.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_atomic.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_block_capability.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_cascade.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_clock.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_compliance_stats.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_conformance_round_trip.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_context_size.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_draftcheck.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_evidence.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_firing_log.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_gc.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_git_hook.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_harvest.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_hosts.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_installer.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_json_contract.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_lifecycle.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_lint.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_match.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_mcp.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_model.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_orphan.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_output.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_precommit_hooks.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_presence.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_presence_adapters.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_presence_signer.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_promote_batch.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_promote_signed.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_reanchor.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_record.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_render.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_render_fit.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_review.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_review_queue.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_rich_markup_values.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_sign_record.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_signing_refuses_unreadable.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_skill.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_store.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_sweep.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_symbols.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_terminal_branches.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_verify.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_violation_evidence.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/tests/test_write_gate_cli.py +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/.gitignore +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/docs/index.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/docs/methodology.md +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/docusaurus.config.ts +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/package-lock.json +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/package.json +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/scripts/sync-changelog.mjs +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/sidebars.ts +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/src/css/custom.css +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/static/img/favicon.svg +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/static/img/social-card.png +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/static/llms.txt +0 -0
- {scar_cli-0.34.0 → scar_cli-0.36.0}/website/tsconfig.json +0 -0
|
@@ -21,6 +21,8 @@ jobs:
|
|
|
21
21
|
python-version: ["3.10", "3.13"]
|
|
22
22
|
steps:
|
|
23
23
|
- uses: actions/checkout@v4
|
|
24
|
+
with:
|
|
25
|
+
fetch-depth: 0 # scar lint's evidence-reachability checks need history
|
|
24
26
|
|
|
25
27
|
- name: Install uv
|
|
26
28
|
uses: astral-sh/setup-uv@v5
|
|
@@ -82,9 +84,15 @@ jobs:
|
|
|
82
84
|
|
|
83
85
|
# Dogfood: the repo's own scar graph must always parse and lint clean.
|
|
84
86
|
# A malformed scar silently never fires (the daimon 0004 incident) —
|
|
85
|
-
# this gate makes that class of rot unmergeable.
|
|
87
|
+
# this gate makes that class of rot unmergeable. It runs the code under
|
|
88
|
+
# review (uv run), not a release, and is at least as strict as the
|
|
89
|
+
# reusable workflow's defaults (.github/workflows/scar.yml, #449): an
|
|
90
|
+
# orphaned scar fails, and every armed violation pattern is swept.
|
|
86
91
|
- name: scar lint
|
|
87
|
-
run: uv run scar lint
|
|
92
|
+
run: uv run scar lint --fail-orphans
|
|
93
|
+
|
|
94
|
+
- name: scar sweep
|
|
95
|
+
run: uv run scar sweep --exit-code
|
|
88
96
|
|
|
89
97
|
lint:
|
|
90
98
|
name: lint (ruff)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Scar runs its review queue through the reusable workflow it publishes, at the
|
|
2
|
+
# local ref, so the file consumers call is the file this repo exercises (#449).
|
|
3
|
+
name: Scar review queue
|
|
4
|
+
on:
|
|
5
|
+
schedule:
|
|
6
|
+
- cron: '0 7 * * 1'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
issues: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
scar:
|
|
15
|
+
uses: ./.github/workflows/scar.yml
|
|
16
|
+
with:
|
|
17
|
+
# No release-managed default exists (GITHUB_TOKEN cannot write workflow
|
|
18
|
+
# files), so this pin is bumped by hand with each release. The workflow
|
|
19
|
+
# installs from PyPI, so it cannot run the checkout's own code.
|
|
20
|
+
scar-version: '0.35.0'
|
|
21
|
+
review-queue: true
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Scar's CI gate as a reusable workflow (#449). Call it, do not copy it:
|
|
2
|
+
#
|
|
3
|
+
# jobs:
|
|
4
|
+
# scar:
|
|
5
|
+
# uses: Daily-Nerd/Scar/.github/workflows/scar.yml@vX.Y.Z
|
|
6
|
+
# with:
|
|
7
|
+
# scar-version: X.Y.Z
|
|
8
|
+
#
|
|
9
|
+
# scar-version is required and has no default on purpose: release-please runs
|
|
10
|
+
# with GITHUB_TOKEN, which can never write under .github/workflows/, so a
|
|
11
|
+
# release-managed default here would fail every release. Pin the same release
|
|
12
|
+
# as the ref, and bump both lines together to upgrade.
|
|
13
|
+
#
|
|
14
|
+
# Every input reaches the shell through env:. None is expanded inside a run:
|
|
15
|
+
# script, where its value would be parsed as code.
|
|
16
|
+
name: Scar
|
|
17
|
+
|
|
18
|
+
on:
|
|
19
|
+
workflow_call:
|
|
20
|
+
inputs:
|
|
21
|
+
scar-version:
|
|
22
|
+
description: >-
|
|
23
|
+
scar-cli version to install from PyPI, for example 0.34.0. Use the
|
|
24
|
+
release the @vX.Y.Z ref points at.
|
|
25
|
+
type: string
|
|
26
|
+
required: true
|
|
27
|
+
fail-orphans:
|
|
28
|
+
description: Fail when any scar is orphan-detected (every anchor resolves to nothing).
|
|
29
|
+
type: boolean
|
|
30
|
+
required: false
|
|
31
|
+
default: true
|
|
32
|
+
fail-partial-rot:
|
|
33
|
+
description: Fail when any scar has a dead anchor among live ones.
|
|
34
|
+
type: boolean
|
|
35
|
+
required: false
|
|
36
|
+
default: false
|
|
37
|
+
sweep:
|
|
38
|
+
description: Also run `scar sweep --exit-code`, every armed violation pattern over the whole tree.
|
|
39
|
+
type: boolean
|
|
40
|
+
required: false
|
|
41
|
+
default: false
|
|
42
|
+
review-queue:
|
|
43
|
+
description: >-
|
|
44
|
+
Keep one rolling issue in sync with `scar lint --review-queue`. The
|
|
45
|
+
calling job must grant `issues: write`.
|
|
46
|
+
type: boolean
|
|
47
|
+
required: false
|
|
48
|
+
default: false
|
|
49
|
+
timezone:
|
|
50
|
+
description: >-
|
|
51
|
+
TZ used to compare review_after dates. Empty means the runner's zone,
|
|
52
|
+
which is UTC on GitHub-hosted runners.
|
|
53
|
+
type: string
|
|
54
|
+
required: false
|
|
55
|
+
default: ''
|
|
56
|
+
runs-on:
|
|
57
|
+
description: >-
|
|
58
|
+
Runner for every job, as a JSON value: a single label such as
|
|
59
|
+
'"self-hosted"' or a list such as '["self-hosted", "linux"]'.
|
|
60
|
+
type: string
|
|
61
|
+
required: false
|
|
62
|
+
default: '"ubuntu-latest"'
|
|
63
|
+
|
|
64
|
+
jobs:
|
|
65
|
+
lint:
|
|
66
|
+
name: scar lint
|
|
67
|
+
runs-on: ${{ fromJSON(inputs.runs-on) }}
|
|
68
|
+
permissions:
|
|
69
|
+
contents: read
|
|
70
|
+
env:
|
|
71
|
+
SCAR_VERSION: ${{ inputs.scar-version }}
|
|
72
|
+
TZ: ${{ inputs.timezone || 'UTC' }}
|
|
73
|
+
steps:
|
|
74
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
75
|
+
with:
|
|
76
|
+
fetch-depth: 0 # evidence-reachability checks need full history
|
|
77
|
+
|
|
78
|
+
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
|
|
79
|
+
|
|
80
|
+
- name: scar lint
|
|
81
|
+
env:
|
|
82
|
+
FAIL_ORPHANS: ${{ inputs.fail-orphans }}
|
|
83
|
+
FAIL_PARTIAL_ROT: ${{ inputs.fail-partial-rot }}
|
|
84
|
+
run: |
|
|
85
|
+
set -- lint
|
|
86
|
+
if [ "$FAIL_ORPHANS" = "true" ]; then set -- "$@" --fail-orphans; fi
|
|
87
|
+
if [ "$FAIL_PARTIAL_ROT" = "true" ]; then set -- "$@" --fail-partial-rot; fi
|
|
88
|
+
uvx --from "scar-cli==$SCAR_VERSION" scar "$@"
|
|
89
|
+
|
|
90
|
+
# Runs even when lint failed, so one red run reports both.
|
|
91
|
+
- name: scar sweep
|
|
92
|
+
if: ${{ !cancelled() && inputs.sweep }}
|
|
93
|
+
run: uvx --from "scar-cli==$SCAR_VERSION" scar sweep --exit-code
|
|
94
|
+
|
|
95
|
+
review-queue:
|
|
96
|
+
name: scar review queue
|
|
97
|
+
if: ${{ inputs.review-queue }}
|
|
98
|
+
runs-on: ${{ fromJSON(inputs.runs-on) }}
|
|
99
|
+
# No permissions: block on purpose. A called workflow can only narrow what
|
|
100
|
+
# the caller grants, and a job that asked for issues: write here would make
|
|
101
|
+
# every caller grant it, queue or not. This job uses the calling job's
|
|
102
|
+
# token as given, so a caller that enables the queue grants issues: write.
|
|
103
|
+
env:
|
|
104
|
+
SCAR_VERSION: ${{ inputs.scar-version }}
|
|
105
|
+
TZ: ${{ inputs.timezone || 'UTC' }}
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
108
|
+
with:
|
|
109
|
+
fetch-depth: 0 # evidence-reachability checks need full history
|
|
110
|
+
|
|
111
|
+
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
|
|
112
|
+
|
|
113
|
+
- name: Build the queue
|
|
114
|
+
# Keep lint's exit code, but let the next step run first: each run
|
|
115
|
+
# step is bash -e, so a bare failure would skip the issue sync.
|
|
116
|
+
run: |
|
|
117
|
+
set +e
|
|
118
|
+
uvx --from "scar-cli==$SCAR_VERSION" scar lint --review-queue > queue.md
|
|
119
|
+
echo "status=$?" >> "$GITHUB_ENV"
|
|
120
|
+
exit 0
|
|
121
|
+
|
|
122
|
+
- name: Sync the rolling issue
|
|
123
|
+
env:
|
|
124
|
+
GH_TOKEN: ${{ github.token }}
|
|
125
|
+
run: |
|
|
126
|
+
label=scar-review-queue
|
|
127
|
+
gh label create "$label" --color BFD4F2 --description "Rolling Scar review queue" --force
|
|
128
|
+
issue=$(gh issue list --label "$label" --state all --limit 1 --json number,state)
|
|
129
|
+
number=$(jq -r '.[0].number // empty' <<<"$issue")
|
|
130
|
+
state=$(jq -r '.[0].state // empty' <<<"$issue")
|
|
131
|
+
if [ -s queue.md ]; then
|
|
132
|
+
if [ -z "$number" ]; then
|
|
133
|
+
gh issue create --title "Scar review queue" --label "$label" --body-file queue.md
|
|
134
|
+
else
|
|
135
|
+
gh issue edit "$number" --body-file queue.md
|
|
136
|
+
if [ "$state" = "CLOSED" ]; then gh issue reopen "$number"; fi
|
|
137
|
+
fi
|
|
138
|
+
elif [ -n "$number" ] && [ "$state" = "OPEN" ]; then
|
|
139
|
+
gh issue close "$number" --comment "Review queue is empty."
|
|
140
|
+
fi
|
|
141
|
+
|
|
142
|
+
- name: Fail the job if lint failed
|
|
143
|
+
if: env.status != '0'
|
|
144
|
+
run: exit 1
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
---
|
|
2
|
+
id: 32
|
|
2
3
|
type: landmine
|
|
3
4
|
title: Scar files are read in one place; a direct read_text on a scar path brings back the crash
|
|
4
5
|
severity: medium
|
|
5
6
|
confidence: 0.8
|
|
6
7
|
created: 2026-11-21
|
|
7
8
|
authors: ["claude-code"]
|
|
9
|
+
promoted_by: Kibukx
|
|
10
|
+
promoted_by_source: git-config-interactive
|
|
11
|
+
promoted_from: candidates/scar-files-have-one-reader.md
|
|
8
12
|
anchors:
|
|
9
13
|
- path: src/scar/store.py
|
|
10
14
|
- pattern: "parse_scar_text\(\w+\.read_text"
|
|
11
|
-
violation: "parse_scar_text\(\w+\.read_text"
|
|
12
15
|
evidence:
|
|
13
16
|
- issue: 439
|
|
14
17
|
- url: https://github.com/Daily-Nerd/Scar/issues/439
|
|
15
18
|
expires:
|
|
16
19
|
condition: "scar files stop being read as UTF-8 text, or the reader moves out of store.py"
|
|
17
20
|
review_after: 2027-05-21
|
|
18
|
-
|
|
21
|
+
violation: "parse_scar_text\(\w+\.read_text"
|
|
22
|
+
status: active
|
|
19
23
|
---
|
|
20
24
|
|
|
21
25
|
store.read_scar_text and store.read_scar are the only code that opens a scar
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 0
|
|
3
|
+
type: landmine
|
|
4
|
+
title: A tool that rewrites a scar's anchors or status must put its evidence note in the same text it writes, or the write gate refuses it
|
|
5
|
+
severity: medium
|
|
6
|
+
confidence: 0.8
|
|
7
|
+
created: 2026-12-01
|
|
8
|
+
authors: ["claude-code"]
|
|
9
|
+
anchors:
|
|
10
|
+
- path: src/scar/store.py
|
|
11
|
+
- path: src/scar/renames.py
|
|
12
|
+
- pattern: "write_active_scar\("
|
|
13
|
+
evidence:
|
|
14
|
+
- issue: 311
|
|
15
|
+
- note: "orphan --fix-renames moved anchors with no record while reanchor and transition each wrote one; each path decided for itself"
|
|
16
|
+
expires:
|
|
17
|
+
condition: "write_active_scar stops being the one in-place write of a numbered scar"
|
|
18
|
+
review_after: 2027-06-01
|
|
19
|
+
status: candidate
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
Every tool rewrite of what a scar says (its signed record: anchors, title,
|
|
23
|
+
severity, type, body; or its status) must leave a dated evidence note. Before
|
|
24
|
+
#311 each path chose for itself, and `orphan --fix-renames` chose silence, so
|
|
25
|
+
a rename-followed scar read exactly like one authored at the new path.
|
|
26
|
+
|
|
27
|
+
`store.write_active_scar` now enforces it: a write that changes the record or
|
|
28
|
+
the status must keep every evidence entry, in order, and append at least one.
|
|
29
|
+
Otherwise it raises `UnrecordedRewrite` and nothing is written. Two traps for
|
|
30
|
+
a new rewrite path:
|
|
31
|
+
|
|
32
|
+
- Do not write the anchor change and then append the note in a second write.
|
|
33
|
+
The first write is refused. Build anchors and notes as one text
|
|
34
|
+
(`renames.anchor_rewrites_text`, each rewrite tuple carries its note) and
|
|
35
|
+
write once. Signed scars need this anyway: the note must be in the bytes
|
|
36
|
+
written with the new act.
|
|
37
|
+
- Add the note through `store.with_evidence_note`, which keeps the file's line
|
|
38
|
+
ending. Before #311 it returned mixed CRLF/LF for a CRLF scar, because the
|
|
39
|
+
parsed body kept its `\r` while `to_text` wrote bare `\n`.
|
|
40
|
+
|
|
41
|
+
`UnrecordedRewrite` is a bug in Scar, not a user refusal: do not catch it and
|
|
42
|
+
report it as one.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 0
|
|
3
|
+
type: landmine
|
|
4
|
+
title: Cascade's execution_id is one agent turn, and using it as edit_id makes the log reader merge real edits
|
|
5
|
+
severity: high
|
|
6
|
+
confidence: 0.8
|
|
7
|
+
created: 2026-12-01
|
|
8
|
+
authors: ["claude-code"]
|
|
9
|
+
anchors:
|
|
10
|
+
- path: src/scar/cascade.py
|
|
11
|
+
violation: "get\(.execution_id"
|
|
12
|
+
evidence:
|
|
13
|
+
- issue: 310
|
|
14
|
+
- issue: 250
|
|
15
|
+
expires:
|
|
16
|
+
condition: "Cascade hook payloads gain a documented per-tool-call identifier"
|
|
17
|
+
review_after: 2027-06-01
|
|
18
|
+
status: candidate
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
Windsurf rows carry no `edit_id` (#310). The obvious fill is the Cascade
|
|
22
|
+
payload's `execution_id`, and it is wrong. Per the Cascade hook docs it
|
|
23
|
+
identifies one agent turn, and a single turn can make several writes or
|
|
24
|
+
commands. `trajectory_id` is wider still: the whole conversation.
|
|
25
|
+
|
|
26
|
+
The coupling is with `cli._dedup_key` (#250). It merges firing-log rows that
|
|
27
|
+
share an `edit_id`, repo, target and id lists, because Codex can write the same
|
|
28
|
+
call twice through two hook channels. Two real Cascade edits to one file in one
|
|
29
|
+
turn that fire the same scar would carry the same `execution_id` and be
|
|
30
|
+
collapsed into one row on read, silently deleting a firing.
|
|
31
|
+
|
|
32
|
+
Leave `edit_id` absent on windsurf rows and let `absent_keys` say so
|
|
33
|
+
(`cascade.CALL_SIGNALS`). Only a documented per-call id may fill it.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 0
|
|
3
|
+
type: fence
|
|
4
|
+
title: Lint judges a scar's act only for statuses a command can sign or move to signable; archived is skipped on purpose
|
|
5
|
+
severity: medium
|
|
6
|
+
confidence: 0.8
|
|
7
|
+
created: 2026-12-01
|
|
8
|
+
authors: ["claude-code"]
|
|
9
|
+
anchors:
|
|
10
|
+
- path: src/scar/model.py
|
|
11
|
+
- path: src/scar/lint.py
|
|
12
|
+
- pattern: "act_judged"
|
|
13
|
+
evidence:
|
|
14
|
+
- issue: 442
|
|
15
|
+
- note: "before #442 lint reported act-missing on archived scars; archived is terminal and nothing signs it, so CI stayed red with no command to clear it"
|
|
16
|
+
expires:
|
|
17
|
+
condition: "archived stops being terminal, or a command can sign an archived scar"
|
|
18
|
+
review_after: 2027-12-01
|
|
19
|
+
status: candidate
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
`downgrade_findings` skips the act checks (unreadable, stale, missing at or
|
|
23
|
+
after `signed_from`) for any status whose `act_judged` is false in the
|
|
24
|
+
`LIFECYCLE` table. Archived, candidate and template are skipped. This looks
|
|
25
|
+
like a hole in the downgrade guard. It is intentional.
|
|
26
|
+
|
|
27
|
+
An archived scar never fires and is terminal by owner ruling, so no command
|
|
28
|
+
can return it to active or sign it. An act error on it could never be cleared:
|
|
29
|
+
before #442 the only way to a green CI was to delete the file or edit the
|
|
30
|
+
config. A stale act on a scar that never injects protects nothing.
|
|
31
|
+
|
|
32
|
+
Do not turn `act_judged` on for a status without a path to a signable one.
|
|
33
|
+
`tests/test_lifecycle_policy.py` fails when lint judges a status no command
|
|
34
|
+
can clear, and when an edge in the table has no command. If archived ever
|
|
35
|
+
gains a way back, judge it again and give the error its remedy.
|
|
36
|
+
|
|
37
|
+
The table lives in `model.py`, not `store.py`, because the store imports lint
|
|
38
|
+
and lint reads the table; moving it into the store makes a circular import.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: 0
|
|
3
|
+
type: landmine
|
|
4
|
+
title: release-please extra-files under .github/workflows/ break every release
|
|
5
|
+
severity: high
|
|
6
|
+
confidence: 0.9
|
|
7
|
+
created: 2026-12-01
|
|
8
|
+
authors: ["claude-code"]
|
|
9
|
+
anchors:
|
|
10
|
+
- path: release-please-config.json
|
|
11
|
+
- path: .github/workflows/scar.yml
|
|
12
|
+
evidence:
|
|
13
|
+
- issue: 449
|
|
14
|
+
- pr: 450
|
|
15
|
+
- note: every release run on main failed with "release-please failed: Error adding to tree" after PR 450 listed scar.yml in extra-files
|
|
16
|
+
expires:
|
|
17
|
+
condition: release-please runs with a token that has the workflows scope, or GitHub lets GITHUB_TOKEN write workflow files
|
|
18
|
+
review_after: 2027-06-01
|
|
19
|
+
status: candidate
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
Adding `.github/workflows/scar.yml` to `extra-files` so its `scar-version`
|
|
23
|
+
default tracked releases looked harmless. release-please runs with
|
|
24
|
+
GITHUB_TOKEN, and GitHub never lets that token write anything under
|
|
25
|
+
`.github/workflows/`, so every release run failed with `Error adding to tree`
|
|
26
|
+
(issue #449, PR #450).
|
|
27
|
+
|
|
28
|
+
Keep workflow files out of `extra-files`. The reusable workflow takes
|
|
29
|
+
`scar-version` as a required input with no default, so callers pin it
|
|
30
|
+
themselves and no secret is needed. `action.yml` sits at the repo root, so its
|
|
31
|
+
release-managed default is fine. A test in `tests/test_docs.py` fails if any
|
|
32
|
+
extra-files path starts with `.github/`.
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.36.0](https://github.com/Daily-Nerd/Scar/compare/v0.35.0...v0.36.0) (2026-12-02)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **ci:** let callers of the reusable workflow choose the runner ([#455](https://github.com/Daily-Nerd/Scar/issues/455)) ([204b24e](https://github.com/Daily-Nerd/Scar/commit/204b24ec84ee58579f175e0683e14969a210b020))
|
|
9
|
+
|
|
10
|
+
## [0.35.0](https://github.com/Daily-Nerd/Scar/compare/v0.34.0...v0.35.0) (2026-12-01)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **ci:** ship a versioned reusable workflow so consumers stop copying CI YAML ([#450](https://github.com/Daily-Nerd/Scar/issues/450)) ([9de573a](https://github.com/Daily-Nerd/Scar/commit/9de573a5657fae912d26c4dfac582ff2dc2e1d19)), closes [#449](https://github.com/Daily-Nerd/Scar/issues/449)
|
|
16
|
+
* **lifecycle:** one table owns status policy, and scar reactivate reaches active ([#451](https://github.com/Daily-Nerd/Scar/issues/451)) ([67644a5](https://github.com/Daily-Nerd/Scar/commit/67644a5a23966161406187f6bb31feb38a277dc8))
|
|
17
|
+
* **orphan:** fix-renames records an evidence note, and the write gate requires one ([#446](https://github.com/Daily-Nerd/Scar/issues/446)) ([f10b882](https://github.com/Daily-Nerd/Scar/commit/f10b882f44283c58b8d14285cd846b8d7c29cacf))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **hooks:** make every firing row declare its per-call keys ([#444](https://github.com/Daily-Nerd/Scar/issues/444)) ([a5ffdac](https://github.com/Daily-Nerd/Scar/commit/a5ffdac060d69d6a7e5796015dbd23d1b8071306))
|
|
23
|
+
* **hooks:** route every hook entrypoint through one fail-open wrapper ([#447](https://github.com/Daily-Nerd/Scar/issues/447)) ([4d05f93](https://github.com/Daily-Nerd/Scar/commit/4d05f93be1b959564be8e176fa473b363641ac37))
|
|
24
|
+
* **release:** stop release-please rewriting a workflow file ([#452](https://github.com/Daily-Nerd/Scar/issues/452)) ([effc2b1](https://github.com/Daily-Nerd/Scar/commit/effc2b168408a563e175152d7cae84b058170200))
|
|
25
|
+
|
|
3
26
|
## [0.34.0](https://github.com/Daily-Nerd/Scar/compare/v0.33.0...v0.34.0) (2026-11-21)
|
|
4
27
|
|
|
5
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: scar-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.36.0
|
|
4
4
|
Summary: SCAR — version control for negative knowledge (deadends, fences, landmines)
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -110,26 +110,39 @@ Both hooks assume `.scars/` already exists (`scar init`) and `language: python`
|
|
|
110
110
|
installs this package into pre-commit's own isolated venv — no separate
|
|
111
111
|
`scar` install required on the machine running the hook.
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
For GitHub Actions, call the reusable workflow instead of copying YAML. It runs
|
|
114
|
+
`scar lint --fail-orphans` by default, and can add `scar sweep` and the rolling
|
|
115
|
+
review queue:
|
|
115
116
|
|
|
116
117
|
```yaml
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
jobs:
|
|
119
|
+
scar:
|
|
120
|
+
uses: Daily-Nerd/Scar/.github/workflows/scar.yml@vX.Y.Z # a release tag, or its full commit SHA
|
|
121
|
+
with:
|
|
122
|
+
scar-version: X.Y.Z # required: the same release as the ref
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The ref and `scar-version` are the pin, so the gate only changes when you
|
|
126
|
+
change those two lines. Inputs and permissions
|
|
127
|
+
are in the [CI docs](https://daily-nerd.github.io/Scar/agents#reusable-workflow).
|
|
128
|
+
|
|
129
|
+
To add the lint gate to a job you already own, use the composite action
|
|
130
|
+
(`action.yml`, repo root). Same pin rule, and check out with full history first:
|
|
131
|
+
|
|
132
|
+
```yaml
|
|
133
|
+
- uses: actions/checkout@v4
|
|
134
|
+
with:
|
|
135
|
+
fetch-depth: 0 # evidence-reachability checks need history
|
|
136
|
+
- uses: Daily-Nerd/Scar@vX.Y.Z
|
|
119
137
|
with:
|
|
120
|
-
fail-orphans: 'true'
|
|
138
|
+
fail-orphans: 'true' # default; set 'false' to only fail on parse errors
|
|
121
139
|
fail-partial-rot: 'false' # opt in; also fail when a scar has a dead anchor among live ones
|
|
122
|
-
version: '' # empty = latest scar-cli from PyPI; or pin e.g. '0.11.0'
|
|
123
|
-
args: '' # extra args appended to `scar lint`
|
|
124
140
|
```
|
|
125
141
|
|
|
126
|
-
`@main` always tracks the latest commit; releases are tagged `vX.Y.Z` via
|
|
127
|
-
release-please, so pin a tag for reproducible CI.
|
|
128
|
-
|
|
129
142
|
`scar lint --review-queue` prints a markdown checklist of scars that need a human
|
|
130
143
|
(orphans, partial rot, symbol drift, unreachable evidence, passed `review_after`),
|
|
131
144
|
empty when there are none. The docs have a scheduled-workflow recipe that keeps
|
|
132
|
-
one rolling issue in sync with it: see [CI](https://daily-nerd.github.io/Scar/
|
|
145
|
+
one rolling issue in sync with it: see [CI](https://daily-nerd.github.io/Scar/agents#review-queue).
|
|
133
146
|
|
|
134
147
|
## Quality discipline
|
|
135
148
|
|
|
@@ -95,26 +95,39 @@ Both hooks assume `.scars/` already exists (`scar init`) and `language: python`
|
|
|
95
95
|
installs this package into pre-commit's own isolated venv — no separate
|
|
96
96
|
`scar` install required on the machine running the hook.
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
For GitHub Actions, call the reusable workflow instead of copying YAML. It runs
|
|
99
|
+
`scar lint --fail-orphans` by default, and can add `scar sweep` and the rolling
|
|
100
|
+
review queue:
|
|
100
101
|
|
|
101
102
|
```yaml
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
jobs:
|
|
104
|
+
scar:
|
|
105
|
+
uses: Daily-Nerd/Scar/.github/workflows/scar.yml@vX.Y.Z # a release tag, or its full commit SHA
|
|
106
|
+
with:
|
|
107
|
+
scar-version: X.Y.Z # required: the same release as the ref
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
The ref and `scar-version` are the pin, so the gate only changes when you
|
|
111
|
+
change those two lines. Inputs and permissions
|
|
112
|
+
are in the [CI docs](https://daily-nerd.github.io/Scar/agents#reusable-workflow).
|
|
113
|
+
|
|
114
|
+
To add the lint gate to a job you already own, use the composite action
|
|
115
|
+
(`action.yml`, repo root). Same pin rule, and check out with full history first:
|
|
116
|
+
|
|
117
|
+
```yaml
|
|
118
|
+
- uses: actions/checkout@v4
|
|
119
|
+
with:
|
|
120
|
+
fetch-depth: 0 # evidence-reachability checks need history
|
|
121
|
+
- uses: Daily-Nerd/Scar@vX.Y.Z
|
|
104
122
|
with:
|
|
105
|
-
fail-orphans: 'true'
|
|
123
|
+
fail-orphans: 'true' # default; set 'false' to only fail on parse errors
|
|
106
124
|
fail-partial-rot: 'false' # opt in; also fail when a scar has a dead anchor among live ones
|
|
107
|
-
version: '' # empty = latest scar-cli from PyPI; or pin e.g. '0.11.0'
|
|
108
|
-
args: '' # extra args appended to `scar lint`
|
|
109
125
|
```
|
|
110
126
|
|
|
111
|
-
`@main` always tracks the latest commit; releases are tagged `vX.Y.Z` via
|
|
112
|
-
release-please, so pin a tag for reproducible CI.
|
|
113
|
-
|
|
114
127
|
`scar lint --review-queue` prints a markdown checklist of scars that need a human
|
|
115
128
|
(orphans, partial rot, symbol drift, unreachable evidence, passed `review_after`),
|
|
116
129
|
empty when there are none. The docs have a scheduled-workflow recipe that keeps
|
|
117
|
-
one rolling issue in sync with it: see [CI](https://daily-nerd.github.io/Scar/
|
|
130
|
+
one rolling issue in sync with it: see [CI](https://daily-nerd.github.io/Scar/agents#review-queue).
|
|
118
131
|
|
|
119
132
|
## Quality discipline
|
|
120
133
|
|
|
@@ -89,6 +89,7 @@ scar check <path|diff> # scars relevant to a path or staged diff; exit code f
|
|
|
89
89
|
scar sweep # run every armed violation over the whole tree; read-only, exit 0 unless --exit-code
|
|
90
90
|
scar why <path> # human-readable history of pain for a file/dir
|
|
91
91
|
scar challenge <id> # open a challenge: contest staleness with evidence
|
|
92
|
+
scar reactivate <id> # return a challenged or orphaned scar to active (refused while every anchor is dead)
|
|
92
93
|
scar harvest # mine git history, emit candidate scars to .scars/candidates/
|
|
93
94
|
scar status # active/orphaned/challenged/expiring counts; repo health
|
|
94
95
|
scar inject --path <p> # machine mode: top-k scars for one edit as hook JSON
|
|
@@ -127,13 +128,27 @@ Hard rule: **max 3 scars injected per edit, max ~120 words each.** A scar system
|
|
|
127
128
|
|
|
128
129
|
```
|
|
129
130
|
candidate ──promote──▶ active ──challenge──▶ challenged
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
▲ │ │
|
|
132
|
+
│ └──orphan --apply──▶ orphaned (every anchor dead)
|
|
133
|
+
│ │
|
|
134
|
+
└──────reactivate────────┘ (from challenged or orphaned)
|
|
135
|
+
|
|
136
|
+
any status but archived ──archive──▶ archived (terminal)
|
|
135
137
|
```
|
|
136
138
|
|
|
139
|
+
| From | To | Command |
|
|
140
|
+
|---|---|---|
|
|
141
|
+
| candidate | active | `scar promote` |
|
|
142
|
+
| active, orphaned | challenged | `scar challenge` |
|
|
143
|
+
| active, challenged | orphaned | `scar orphan --apply` (every anchor dead) |
|
|
144
|
+
| challenged, orphaned | active | `scar reactivate` (an orphaned scar needs a live anchor) |
|
|
145
|
+
| candidate, active, challenged, orphaned | archived | `scar archive` |
|
|
146
|
+
|
|
147
|
+
Each move writes a dated evidence note. `archived` is terminal. The legal
|
|
148
|
+
moves, and for each status whether it fires, can be signed and has its act
|
|
149
|
+
judged by lint, are one table (`LIFECYCLE` in `model.py`, read through the
|
|
150
|
+
store). `reanchor --apply` rewrites anchors and never changes a status.
|
|
151
|
+
|
|
137
152
|
- Confidence is a static, human-authored ranking weight (0..1); the tool does not currently mutate it. Dynamic confidence — decay toward a floor without confirmations, an uphold bump on a survived challenge, and an explicit `scar confirm <id>` — is deferred until scar volume and confirmation data can calibrate a decay policy without unvalidated constants (issue #95).
|
|
138
153
|
- `review_after` forces periodic human contact with old scars; CI can warn on overdue reviews.
|
|
139
154
|
- `review_after_firings` is the count-based sibling of `review_after`: once a scar has fired N times *since the last commit that touched its file*, `scar status` and `scar lint` escalate it from an ambient warning to an explicit review flag. Revising the scar re-affirms it and restarts the count; archiving it silences the flag because archived scars do not fire. Absent ⇒ per-type default (`landmine` 10, `fence` 15, `deadend` disabled); `0` ⇒ never escalate. Advisory by default — `scar lint --fail-firing-review` opts into a non-zero exit. Escalation reports only; it never archives or challenges a scar (ADR-4 keeps lifecycle transitions human).
|
|
@@ -359,6 +374,21 @@ advance, and a field that silently never populates is a blind column rather
|
|
|
359
374
|
than a measurement. Check the population rate before drawing any conclusion
|
|
360
375
|
from the values.
|
|
361
376
|
|
|
377
|
+
Omission alone cannot say *why* a key is missing, so every firing row also
|
|
378
|
+
carries `absent_keys`: the per-call keys the writer looked for and the host did
|
|
379
|
+
not supply on this call (`edit_id`, `context_bytes`; a verdict row declares only
|
|
380
|
+
`edit_id`). It is always written, `[]` when nothing is absent. A key listed
|
|
381
|
+
there is a fact about the host. A key missing from a row that has no
|
|
382
|
+
`absent_keys` at all means the row predates the field, the same rule as `armed_ids`.
|
|
383
|
+
Windsurf's payload carries no per-call id and no transcript path (its
|
|
384
|
+
`execution_id` is one agent turn, which can make several edits), so its rows
|
|
385
|
+
list both. Those rows count as `verdicts_unplaceable` and
|
|
386
|
+
`firings_context_unknown`, never as joined.
|
|
387
|
+
|
|
388
|
+
Every row writer requires this declaration. An adapter for a new host cannot
|
|
389
|
+
write a row without stating what its host supplies, so a forgotten key can no
|
|
390
|
+
longer look like a host that had nothing to give.
|
|
391
|
+
|
|
362
392
|
Nothing reads `context_bytes` to make a decision, and no claim is derived from
|
|
363
393
|
it here. The analysis that will read it is pre-registered separately and is
|
|
364
394
|
gated on a real distribution existing first: buckets chosen after seeing a
|
|
@@ -789,6 +819,15 @@ So a tool that rewrites a signed scar has two outcomes: it signs the new
|
|
|
789
819
|
record, or it refuses. An act that matches its record is never left stale by a
|
|
790
820
|
tool.
|
|
791
821
|
|
|
822
|
+
A second rule holds for every numbered scar, signed or not: a write that
|
|
823
|
+
changes the record or the status keeps every evidence entry, in order, and
|
|
824
|
+
appends at least one. That entry is the dated note saying what the tool did
|
|
825
|
+
(`reanchored ... (tier: high)`, `fix-renames ... (git -M)`, `challenged ...`).
|
|
826
|
+
A write that does not raises `UnrecordedRewrite` and leaves the file untouched.
|
|
827
|
+
It is raised only for a code path that forgot its note, so it is a bug in Scar,
|
|
828
|
+
not a refusal. A file that does not parse, before or after, has no record to
|
|
829
|
+
compare and is not judged by this rule.
|
|
830
|
+
|
|
792
831
|
The limit: a tool signs only a scar whose act matches its record. A scar with a
|
|
793
832
|
stale act, or with no act at or after `signed_from`, is written with no touch by
|
|
794
833
|
`scar reanchor --apply` and `scar orphan --fix-renames`, and lint reports it.
|
|
@@ -845,11 +884,12 @@ Only an active scar is ever signed (`check_signable_status`, `resign_target`).
|
|
|
845
884
|
| `archived` | no | Refused, and archived is terminal |
|
|
846
885
|
| `template` | no | Not a scar |
|
|
847
886
|
|
|
848
|
-
A
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
887
|
+
A challenged or orphaned scar that lint reports for a stale or missing act is
|
|
888
|
+
signed in two steps: `scar reactivate N` returns it to `active` (status is not
|
|
889
|
+
in the record, so an act that matched still matches), then `scar resign --id N`
|
|
890
|
+
signs it. Reactivate prints the lint error it leaves, with that remedy. An
|
|
891
|
+
archived scar is never signed and lint does not judge its act (10.13): archived
|
|
892
|
+
is terminal, and the knowledge returns as a new candidate.
|
|
853
893
|
|
|
854
894
|
### 10.12 What each command does
|
|
855
895
|
|
|
@@ -858,8 +898,8 @@ terminal, and the knowledge returns as a new candidate.
|
|
|
858
898
|
| `scar promote` (org set) | One touch per candidate, written only after acceptance. A batch is a queue: a failure at k leaves 1 to k-1 promoted | `promote_one`, `_promote_one`, `preflight` | `tests/test_promote_signed.py` |
|
|
859
899
|
| `scar resign --id N` | Signs the record as it stands and swaps only the act and receipt lines. Refused when the act already matches | `resign_target`, `resign_one`, `_cmd_resign` | `tests/test_resign.py` |
|
|
860
900
|
| `scar reanchor --apply` | One touch. Anchors, notes and act in one write. Refuses otherwise | `_reanchor_apply`, `_sign_in_place` | `tests/test_sign_in_place.py` |
|
|
861
|
-
| `scar orphan --fix-renames` | Unsigned scars first with no touch, then signed scars in id order, one touch each. A cancel stops the asking | `_orphan_fix_renames`, `_sign_in_place` | `tests/test_sign_in_place.py` |
|
|
862
|
-
| `scar orphan --apply`, `scar challenge`, `scar archive`, evidence notes | Status and notes only. The record is unchanged, so the act still matches | `transition`, `append_evidence_note`, `write_active_scar` | `tests/test_write_gate.py` |
|
|
901
|
+
| `scar orphan --fix-renames` | Unsigned scars first with no touch, then signed scars in id order, one touch each. Each moved anchor gets a `fix-renames <date>: path <old> -> <new> (git -M)` note in the same write. A cancel stops the asking | `_orphan_fix_renames`, `_sign_in_place` | `tests/test_sign_in_place.py` |
|
|
902
|
+
| `scar orphan --apply`, `scar challenge`, `scar reactivate`, `scar archive`, evidence notes | Status and notes only. The record is unchanged, so the act still matches | `transition`, `append_evidence_note`, `write_active_scar` | `tests/test_write_gate.py` |
|
|
863
903
|
| hand edit of the record | The act goes stale and lint errors. `scar resign` is the remedy for an active scar | `downgrade_findings` | `tests/test_resign.py` |
|
|
864
904
|
| `scar lint` | Never signs. Reports the states of 10.13, and with `--verify-promotion` those of 10.14 | `downgrade_findings`, `verify_store` | `tests/test_signing_contract.py` |
|
|
865
905
|
|
|
@@ -877,9 +917,13 @@ state is an error:
|
|
|
877
917
|
| `config-no-signed-from` | The config names an org without `signed_from` | `names an org but not signed_from` |
|
|
878
918
|
| `config-past-next-id` | `signed_from` is past the next free id | `is beyond the next id` |
|
|
879
919
|
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
920
|
+
`act-unreadable`, `act-stale` and `act-missing` are judged only for a status
|
|
921
|
+
whose act lint judges in the lifecycle table (`act_judged`): active, challenged
|
|
922
|
+
and orphaned. An archived scar is not judged: it never fires, is terminal and
|
|
923
|
+
no command can sign it, so an error on it could never be cleared. The message
|
|
924
|
+
ends with the command that clears it (`_resign_hint`): `scar resign --id N` for
|
|
925
|
+
an active scar, and for a challenged or orphaned one `scar reactivate N`, then
|
|
926
|
+
`scar resign --id N`.
|
|
883
927
|
|
|
884
928
|
### 10.14 Verify states
|
|
885
929
|
|