fix: build versioned XLSM from template and update release checklist#334
Merged
fix: build versioned XLSM from template and update release checklist#334
Conversation
- release.py: replace _copy_runner_xlsm (which copied the raw root-level Runner.xlsm) with _build_runner_xlsm, which calls build_xlsm_artifact to produce a versioned counter_risk_runner.xlsm from assets/templates/counter_risk_template.xlsm with version metadata injected into docProps/core.xml; raises ValueError if template missing - tests: provide a minimal valid XLSM ZIP in _write_fake_repo via _make_minimal_xlsm(); update runner_xlsm tests to exercise _build_runner_xlsm and verify version metadata is present in output; update fail-fast test to check for missing template, not missing Runner.xlsm - RELEASE_CHECKLIST.md: add Windows prerequisite note; add new bundle artifacts to validation checks and expected contents list; add config path update step; add macro trust confirmation step; remove stale explicit xlsm build step from main sequence (now internal to assembler) https://claude.ai/code/session_01D7662TN52iZPqh1HgAFBRQ
335f591 to
a952e23
Compare
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves release bundle assembly so the operator XLSM is generated from the canonical template with version metadata injected, and expands the bundle/docs to include a remote-trigger workflow.
Changes:
- Build
counter_risk_runner.xlsmfromassets/templates/counter_risk_template.xlsmduring release assembly (injecting version metadata intodocProps/core.xml). - Include/copy remote-trigger scripts (
request_*.cmd,process_*.cmd) and accompanying documentation into the release bundle, and update the bundle README. - Update release-bundle tests and expand the release checklist to reflect the new artifacts and operator steps.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/counter_risk/build/release.py |
Adds runner XLSM build step and copies remote-trigger scripts/docs into the assembled bundle; updates README instructions. |
tests/test_release_bundle.py |
Adds minimal XLSM ZIP fixture + tests for XLSM build behavior and inclusion of remote-trigger artifacts in the bundle/manifest. |
scripts/windows/request_counter_risk_remote.cmd |
New requester-side script to write .request files for a worker to process. |
scripts/windows/process_counter_risk_remote.cmd |
New worker-side script to poll for .request files and run the CLI with generated settings. |
docs/remote_trigger_testing.md |
New documentation describing the shared-folder remote request flow. |
docs/RELEASE_CHECKLIST.md |
Updates prerequisites, expected artifacts, validation steps, and operator guidance for the new bundle contents. |
Comments suppressed due to low confidence (2)
src/counter_risk/build/release.py:135
- _copy_remote_scripts currently logs and skips missing .cmd files, which can silently produce a bundle without the remote trigger entrypoints even though the release checklist expects them. Consider raising an error when either script is missing (or writing a manifest flag that clearly indicates the remote trigger feature is unavailable).
scripts_src = root / "scripts" / "windows"
names = ["request_counter_risk_remote.cmd", "process_counter_risk_remote.cmd"]
copied: list[Path] = []
for name in names:
src = scripts_src / name
if not src.is_file():
LOGGER.warning("Remote script not found at '%s'; skipping.", src)
continue
src/counter_risk/build/release.py:121
- _copy_remote_trigger_doc only logs and skips when docs/remote_trigger_testing.md is missing, but the release checklist now treats this file as an expected bundle artifact. To avoid silently producing an incomplete bundle, consider failing fast (raise ValueError) when the doc is missing, or explicitly documenting/encoding that it’s optional (e.g., feature flag / separate artifact group).
src = root / "docs" / "remote_trigger_testing.md"
if not src.is_file():
LOGGER.warning("remote_trigger_testing.md not found at '%s'; skipping.", src)
return []
Contributor
🤖 Keepalive Loop StatusPR #334 | Agent: Codex | Iteration 0/5 Current State
🔍 Failure Classification| Error type | infrastructure | |
Contributor
Keepalive Work Log (click to expand)
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The date symbol became unused after _build_runner_xlsm was updated to call run_date.date() instead of date.today(). Removes the F401 ruff violation. https://claude.ai/code/session_01D7662TN52iZPqh1HgAFBRQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-deployment fixes identified during local deploy readiness review.
Changes
release.py— XLSM built from template, not copied from root_copy_runner_xlsm(which grabbed the raw developerRunner.xlsmfrom the repo root) is replaced by_build_runner_xlsm, which callsbuild_xlsm_artifactto produce a properly versionedcounter_risk_runner.xlsmfromassets/templates/counter_risk_template.xlsmwith version metadata injected intodocProps/core.xml. RaisesValueErrorif the template is missing.tests/test_release_bundle.py_make_minimal_xlsm()helper produces a valid XLSM ZIP for test fixtures_write_fake_reponow seeds a valid XLSM ZIP for the template_build_runner_xlsmand assert version metadata is present in the outputRunner.xlsm)docs/RELEASE_CHECKLIST.mdhttps://claude.ai/code/session_01D7662TN52iZPqh1HgAFBRQ