Repository navigation
Fix report-ingest's $lib.debug() call, catch Storm syntax errors in CI, bump Actions - #49
Merged
Merged
Conversation
$lib.debug is a boolean, so calling it raised "'boolean' object is not callable" whenever the report URL request failed, hiding the package's own "Could not get the report URL!" error and the HTTP error detail. Print the HTTP error when debug is on instead. - Add the first report-ingest tests, for a failed request with and without --debug. - Fix the command's help examples, which used stix.ingest. - Patch bump report-ingest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KBLBzjs3FWt5tMeTsVjC79
Tests only loaded the packages they named, and the package build doesn't parse Storm, so the stix package shipped with syntax errors and green CI. - tests/pkgs/test_all_pkgs.py loads every package under src/pkgs into a Cortex. - Add `make lint-storm` (Synapse's Storm linter, E rules) and run it before the tests in the Build, Tests, and Prepare Release workflows. - The Pipfile requires Synapse >=2.256.0, the first release with the linter. - Document both in the contribution guide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KBLBzjs3FWt5tMeTsVjC79
actions/checkout@v4 and actions/setup-python@v5 run on Node.js 20, which GitHub deprecated (CI warned they were being forced onto Node.js 24). Pin every action to its latest release, all of which run on Node.js 24: - actions/checkout v4 -> v7.0.1 - actions/setup-python v5 -> v7.1.0 - actions/configure-pages v5 -> v6.0.0 - actions/deploy-pages v4 -> v5.0.1 - actions/upload-pages-artifact v3 -> v5.0.0 - softprops/action-gh-release v2 -> v3.0.3 Every input the workflows pass still exists in the new versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KBLBzjs3FWt5tMeTsVjC79
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.
Bug
When fetching the report URL failed,
doReportRequest()inslib.report.ingest.lib.stormcalled$lib.debug(...).$lib.debugis a boolean, so the command died with:That error replaced the package's own
"Could not get the report URL!"error, and the$resp.errdetail was never printed, even with--debug. This is the same bug #48 fixed in stix.Fix
if $lib.debug { $lib.print(HTTP Error: {$resp.err}) }. No$lib.debug(...)calls remain insrc/pkgs.tests/pkgs/report_ingest/. They point the command athttp://127.0.0.1:1/, where nothing listens, so the request fails without leaving the host. One test checks the warning and the package's own error. The other checks that--debugalso prints the HTTP error. Both fail onmainwith the'boolean' object is not callableerror.stix.ingestinstead ofslib.report.ingest.0.1.1→0.1.2.Why tests and CI missed it
StormPkgTestonly loads the packages a test names, so pytest never touched it.make build-stormdoesn't parse Storm. Building the pre-Fix stix package syntax errors, move release docs to the contribution guide #48 stix, with its syntax errors, still exits 0.CI guards
These close the gaps that let stix's syntax errors through:
tests/pkgs/test_all_pkgs.pyloads every package undersrc/pkgs/into a Cortex, which validates all of its Storm. It finds packages by directory (src/pkgs/<name>/<name>.yaml, asbuild.shdoes), so new packages are covered without a test of their own. Against the pre-Fix stix package syntax errors, move release docs to the contribution guide #48 stix it reportsstix.yaml: BadSyntax(...).make lint-stormrunspython -m synapse.tools.storm.lint --select E src/pkgs, Synapse's Storm linter limited to errors. The Build, Tests, and Prepare Release workflows run it beforemake tests. It passes onmain's packages and exits 1 on the pre-Fix stix package syntax errors, move release docs to the contribution guide #48 stix.synapse>=2.256.0,<3, the first release with the linter. The library's own floor inpyproject.tomlstays>=2.225.0.GitHub Actions bump
CI warned that
actions/checkout@v4andactions/setup-python@v5target Node.js 20, which GitHub has deprecated, so they were being forced onto Node.js 24. Every action is now pinned to its latest release, and all of them run on Node.js 24 exceptupload-pages-artifact, which is a composite action:actions/checkoutactions/setup-pythonactions/configure-pagesactions/deploy-pagesactions/upload-pages-artifactsoftprops/action-gh-releaseEvery input the workflows pass (
token,fetch-depth,ref,python-version,path, and the release inputs) still exists in the new versions. Breaking changes checked:git pushin the same workspace still uses them, so Prepare Release's push withRELEASE_TOKENis unaffected. v7 only blocks checking out fork PRs forpull_request_target/workflow_run, which no workflow uses.cp -r docs/*, which skips dotfiles, so the artifact doesn't change.This PR's CI runs Build and Tests on the new versions. Pages, Prepare Release, and Release only run from
mainor by hand, so they'll first use the new versions after merge.Testing
pytest tests: 35 passed. The deprecation check fromtests/conftest.pyis on.python -m synapse.tools.storm.lint --select E src/pkgs: all checks pass. In CI, the step ran through pipenv and passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01KBLBzjs3FWt5tMeTsVjC79