patchshuttle 0.1.0a2__tar.gz → 0.1.0a3__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.
Files changed (107) hide show
  1. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/.github/workflows/ci.yml +1 -1
  2. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/.github/workflows/release.yml +1 -1
  3. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/.github/workflows/testpypi.yml +1 -1
  4. patchshuttle-0.1.0a3/CHANGELOG.md +145 -0
  5. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/PKG-INFO +255 -66
  6. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/README.md +252 -65
  7. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/SPEC_V0_1.md +288 -39
  8. patchshuttle-0.1.0a3/docs/RELEASE.md +185 -0
  9. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/pyproject.toml +3 -0
  10. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/__init__.py +4 -0
  11. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/_diff.py +68 -8
  12. patchshuttle-0.1.0a3/src/patchshuttle/_html_lint.py +49 -0
  13. patchshuttle-0.1.0a3/src/patchshuttle/_line_ranges.py +105 -0
  14. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/_process.py +22 -3
  15. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/_version.py +1 -1
  16. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/actions/__init__.py +8 -0
  17. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/actions/constructors.py +120 -0
  18. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/audit.py +47 -5
  19. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/backup.py +11 -0
  20. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/checks/__init__.py +2 -0
  21. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/checks/constructors.py +16 -0
  22. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/checks/runner.py +29 -8
  23. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/cli.py +376 -59
  24. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/config.py +63 -3
  25. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/context.py +4 -11
  26. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/errors.py +16 -1
  27. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/execution.py +12 -1
  28. patchshuttle-0.1.0a3/src/patchshuttle/formatter_policy.py +59 -0
  29. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/formatters/runner.py +33 -10
  30. patchshuttle-0.1.0a3/src/patchshuttle/linters/__init__.py +19 -0
  31. patchshuttle-0.1.0a3/src/patchshuttle/linters/runner.py +153 -0
  32. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/logging.py +206 -21
  33. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/models.py +118 -2
  34. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/planner.py +475 -17
  35. patchshuttle-0.1.0a3/src/patchshuttle/preflight.py +381 -0
  36. patchshuttle-0.1.0a3/src/patchshuttle/resources/AI_GUIDE.md +250 -0
  37. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/resources/PATCHSHUTTLE_PROTOCOL.md +58 -9
  38. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/runner.py +114 -8
  39. patchshuttle-0.1.0a3/src/patchshuttle/runtime_cache.py +185 -0
  40. patchshuttle-0.1.0a3/src/patchshuttle/selfdoc.py +235 -0
  41. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/workspace.py +52 -0
  42. patchshuttle-0.1.0a3/tests/unit/test_attempt_logging.py +142 -0
  43. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_backup.py +21 -1
  44. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_checks.py +152 -4
  45. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_cli.py +368 -5
  46. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_config.py +80 -0
  47. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_context_and_constructors.py +79 -0
  48. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_diff.py +80 -0
  49. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_formatters.py +108 -0
  50. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_formatting_transaction.py +68 -0
  51. patchshuttle-0.1.0a3/tests/unit/test_guarded_ranges.py +471 -0
  52. patchshuttle-0.1.0a3/tests/unit/test_html_lint.py +355 -0
  53. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_logging.py +56 -0
  54. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_models.py +169 -0
  55. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_package.py +7 -4
  56. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_planner.py +6 -0
  57. patchshuttle-0.1.0a3/tests/unit/test_planner_ux.py +277 -0
  58. patchshuttle-0.1.0a3/tests/unit/test_preflight.py +664 -0
  59. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_release_configuration.py +2 -1
  60. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_rollback.py +8 -2
  61. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_runner.py +230 -1
  62. patchshuttle-0.1.0a3/tests/unit/test_runtime_cache.py +320 -0
  63. patchshuttle-0.1.0a3/tests/unit/test_selfdoc.py +74 -0
  64. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_workspace.py +105 -0
  65. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tools/index_smoke.py +66 -3
  66. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tools/release_checks.py +17 -0
  67. patchshuttle-0.1.0a3/tools/wheel_smoke.py +276 -0
  68. patchshuttle-0.1.0a2/CHANGELOG.md +0 -55
  69. patchshuttle-0.1.0a2/docs/RELEASE.md +0 -101
  70. patchshuttle-0.1.0a2/src/patchshuttle/resources/AI_GUIDE.md +0 -163
  71. patchshuttle-0.1.0a2/tools/wheel_smoke.py +0 -149
  72. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/.gitignore +0 -0
  73. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/LICENSE +0 -0
  74. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/SECURITY.md +0 -0
  75. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/actions/create.py +0 -0
  76. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/actions/modify.py +0 -0
  77. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/formatters/__init__.py +0 -0
  78. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/identifiers.py +0 -0
  79. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/inventory.py +0 -0
  80. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/operations.py +0 -0
  81. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/parser.py +0 -0
  82. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/policy.py +0 -0
  83. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/py.typed +0 -0
  84. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/registry.py +0 -0
  85. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/resources/AUDIT-EXAMPLE.psh.yaml +0 -0
  86. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/resources/PATCH-EXAMPLE.psh.yaml +0 -0
  87. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/resources/__init__.py +0 -0
  88. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/rollback.py +0 -0
  89. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/src/patchshuttle/verification.py +0 -0
  90. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/e2e/test_cli_project_cycle.py +0 -0
  91. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/integration/test_workflows.py +0 -0
  92. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_actions.py +0 -0
  93. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_audit_verify_execution.py +0 -0
  94. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_change_transaction.py +0 -0
  95. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_check_transaction.py +0 -0
  96. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_execution.py +0 -0
  97. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_identifiers.py +0 -0
  98. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_inventory.py +0 -0
  99. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_inventory_transaction.py +0 -0
  100. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_manual_rollback.py +0 -0
  101. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_modify_actions.py +0 -0
  102. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_operational_execution.py +0 -0
  103. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_parser.py +0 -0
  104. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_phase19_cli.py +0 -0
  105. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_policy.py +0 -0
  106. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tests/unit/test_registry.py +0 -0
  107. {patchshuttle-0.1.0a2 → patchshuttle-0.1.0a3}/tools/check_tag.py +0 -0
@@ -41,7 +41,7 @@ jobs:
41
41
  - name: Install development environment
42
42
  run: |
43
43
  python -m pip install --upgrade pip
44
- python -m pip install -e ".[dev]"
44
+ python -m pip install -e ".[dev,html]"
45
45
  - name: Check import ordering
46
46
  run: python -m isort --check-only src tests tools
47
47
  - name: Check formatting
@@ -27,7 +27,7 @@ jobs:
27
27
  - name: Test, build, and validate distributions
28
28
  run: |
29
29
  python -m pip install --upgrade pip
30
- python -m pip install -e ".[dev]"
30
+ python -m pip install -e ".[dev,html]"
31
31
  python -m isort --check-only src tests tools
32
32
  python -m black --check src tests tools
33
33
  python -m coverage erase
@@ -20,7 +20,7 @@ jobs:
20
20
  - name: Build and validate distributions
21
21
  run: |
22
22
  python -m pip install --upgrade pip
23
- python -m pip install -e ".[dev]"
23
+ python -m pip install -e ".[dev,html]"
24
24
  python -m isort --check-only src tests tools
25
25
  python -m black --check src tests tools
26
26
  python -m coverage erase
@@ -0,0 +1,145 @@
1
+ # Changelog
2
+
3
+ All notable changes to PatchShuttle are recorded in this file. The project
4
+ uses semantic versioning, including Python-compatible pre-release versions.
5
+
6
+ ## Unreleased
7
+
8
+ ## 0.1.0a3 - 2026-08-23
9
+
10
+ Second alpha release, focused on AI-facing planning diagnostics, legacy-project
11
+ formatter compatibility, optional HTML linting, operational self-documentation,
12
+ and strict guarded physical-line operations.
13
+
14
+ ### Added
15
+
16
+ - `patchshuttle plan JOB.psh.yaml --diff` prints a bounded unified preview of
17
+ the fully resolved in-memory file changes without writing project files.
18
+ - Exact text-action mismatches now include exact line numbers or up to three
19
+ bounded, similarity-ranked nearby snippets. Unified-diff failures include
20
+ hunk numbers, declared and actual counts, and first context mismatches.
21
+ - Changed Python files receive a read-only PEP 263 encoding, isort, and Black
22
+ compatibility preflight during planning.
23
+ - The optional `patchshuttle[html]` extra installs djLint. Local configuration
24
+ can enable lint-only checks for the exact changed `.html` scope, including
25
+ isolated stdin-based planning preflight, fixed non-shell execution, log
26
+ records, and automatic rollback on failure. Project djLint configuration
27
+ cannot override this local PatchShuttle policy.
28
+ - Validation and planning failures now write timestamped AI-readable attempt
29
+ logs after a workspace is resolved, so `logs --last` exposes the newest
30
+ recorded failure without archiving invalid job source or updating registry
31
+ state.
32
+ - A global `--workspace PATH` option routes workspace-aware commands to an
33
+ exact root. Missing implicit workspaces can report bounded direct-child
34
+ candidates without selecting one automatically.
35
+ - Workspace-independent `capabilities`, `schema`, and `explain TOPIC` commands
36
+ expose the installed protocol surface without weakening protected paths.
37
+ - Local `isort_exclude` and `black_exclude` lists accept exact normalized
38
+ changed-Python paths. Plans and logs expose a per-file, per-tool decision
39
+ matrix while jobs remain unable to change formatter policy.
40
+ - `django_import_check` imports bounded dotted module names through
41
+ `manage.py shell -c`, allowing project checks that require initialized
42
+ Django settings and the app registry without accepting arbitrary code.
43
+ - Read-only `hash_range` and guarded `replace_range`, `delete_range`, and
44
+ `insert_at_line` operations add 1-based inclusive physical-line addressing
45
+ without weakening identity checks. Content and SHA-256 guards use canonical
46
+ LF/UTF-8 bytes, evaluate against sequential simulated content, and fail
47
+ closed without fuzzy relocation or partial application.
48
+
49
+ ### Changed
50
+
51
+ - Backup manifests record the approved HTML lint scope, and run logs include a
52
+ fixed `LINT_HTML` section plus `html_lint_status` in the summary.
53
+ - HTML linting is disabled by default and cannot be enabled or reconfigured by
54
+ an AI job.
55
+ - Formatter preflight distinguishes an incompatible legacy baseline from
56
+ incompatibility introduced by planned content, allows a patch that repairs
57
+ the baseline, and retains bounded Black stderr in planning diagnostics.
58
+ - Black compatibility preflight and execution use the same controlled CLI
59
+ policy options; Black's ordinary check-only reformat exit remains compatible.
60
+
61
+ ### Fixed
62
+
63
+ - Source-version transitions no longer compare a new checkout version with
64
+ stale editable-install metadata before rebuilding. Distribution metadata
65
+ remains validated from the wheel and source archive by the release gates.
66
+ - Python checks now redirect bytecode caches to an isolated temporary
67
+ directory, so `compileall`, imports, and test collection do not leave
68
+ `__pycache__` entries that can obstruct rollback of a newly created package.
69
+ - A defensive runtime-cache ledger removes only new regular `.pyc` files and
70
+ newly empty `__pycache__` directories in the changed-Python scope before
71
+ completion or rollback, while preserving every pre-existing or foreign
72
+ entry.
73
+ - Binary Python targets are classified before PEP 263 formatter preflight, and
74
+ resolved-diff no-change coverage now uses platform-stable LF bytes.
75
+ - Symlink-dependent tests now skip consistently when the platform or current
76
+ process cannot create symbolic links.
77
+
78
+ ## 0.1.0a2 - 2026-08-16
79
+
80
+ First published alpha release, qualified on TestPyPI and released to production
81
+ PyPI through Trusted Publishing.
82
+
83
+ ### Added
84
+
85
+ - Existing-project and empty-directory initialization with stable project IDs.
86
+ - Protocol 1 YAML jobs and equivalent immutable Python constructors.
87
+ - Bounded `audit`, transactional `patch`, and one-pass `verify` workflows.
88
+ - All v0.1 text actions, controlled Python, pytest, unittest, Django, import,
89
+ and locally configured checks.
90
+ - Per-job backups, automatic rollback, guarded manual rollback, and explicit
91
+ `--keep-changes` failure handling.
92
+ - Changed-Python-only isort followed by Black, with final check reruns.
93
+ - Workspace inventory comparison and unexpected side-effect reporting.
94
+ - Fixed-section timestamped logs, exact job archives, registry idempotency,
95
+ project snapshots, and compact AI handoffs.
96
+ - Integration, end-to-end, wheel smoke, release validation, and index smoke
97
+ tests.
98
+ - GitHub Actions workflows for the required Ubuntu and Windows matrix and for
99
+ Trusted Publishing to TestPyPI and PyPI.
100
+
101
+ ### Security
102
+
103
+ - Deny-by-default confirmation for patch and verify execution.
104
+ - Protected and ignored path policy, symbolic-link and special-file rejection,
105
+ bounded inputs and outputs, non-shell subprocess execution, and best-effort
106
+ log redaction.
107
+
108
+ ### Fixed
109
+
110
+ - Python 3.10 TOML compatibility in package and index-smoke checks.
111
+ - Windows inventory capture when path metadata does not expose stable inode
112
+ identifiers.
113
+ - Persistent cross-platform workspace locking with `filelock` native locks.
114
+ - Platform-neutral subprocess newlines and portable filesystem test fixtures.
115
+
116
+ ### Qualification status
117
+
118
+ - Local Linux/Python 3.10 and 3.12 verification is complete with 100% statement
119
+ and branch coverage.
120
+ - The required GitHub-hosted Ubuntu/Python 3.10, 3.12, and 3.14 plus
121
+ Windows/Python 3.12 and 3.14
122
+ [matrix passed](https://github.com/ratundo/patchshuttle/actions/runs/31969439894)
123
+ on 2026-08-16.
124
+ - The
125
+ [TestPyPI workflow](https://github.com/ratundo/patchshuttle/actions/runs/31968375793)
126
+ and its clean index installation passed before production publication.
127
+ - The
128
+ [production workflow](https://github.com/ratundo/patchshuttle/actions/runs/31969527644),
129
+ [GitHub pre-release](https://github.com/ratundo/patchshuttle/releases/tag/v0.1.0a2),
130
+ and [PyPI publication](https://pypi.org/project/patchshuttle/0.1.0a2/)
131
+ completed on 2026-08-16, followed by a clean installation smoke test.
132
+ - TestPyPI and PyPI received byte-identical files. The wheel SHA-256 is
133
+ `debf664d9ffc1f2763d55fcb0fb4bb47b226ad5b40aa1bf099ce0ab9c6c0c2e6` and
134
+ the source archive SHA-256 is
135
+ `1ae7f233a674704a49f186ef1842e490f10f9814701f712aabed9d16ebe5164c`.
136
+ - A recorded ChatGPT audit, patch, formatting, repeated-check, and independent
137
+ verification workflow passed on Windows 11 with Python 3.14.2 on 2026-08-17.
138
+ See [the release record](docs/RELEASE.md#chatgpt-end-to-end-record) for its
139
+ scope and job hashes.
140
+
141
+ ## 0.1.0a1 - 2026-08-06
142
+
143
+ Internal development checkpoint containing the initial package scaffold,
144
+ typed job model, validation, workspace, path policy, planner, and early
145
+ transaction engine. It was not published as a supported release.