Repository navigation
Conversation
- run-tools.php runs the tools in the container, writes the full output to files in the state directory and prints one line per tool - compare-tool-runs.php prints only what is new against the baseline - tool-output.php holds the output parsing shared with check-baselines.php and compare-baselines.php - The baseline run pins the sniffer entry point, the test environment and one set of codecept options per test configuration - spryker-upgrade and spryker-feature-install call the runner instead of the raw tool commands
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.
Stacked on #52 (token reduction phase 1). Merge #52 first.
What changes
spryker-upgradeandspryker-feature-installmade the agent run PHPStan, the code sniffer, theevaluator and Codeception by hand (
… 2>&1 | tee <file>). The full tool output went into the agent'scontext, and the agent compared the results with the baseline by reading the logs.
run-tools.phpruns the tools in the container with the same commands as before (pseudo-terminalwrapper for macOS and Linux, the same memory limit). It writes the full output to the file names
that
check-baselines.php,compare-baselines.phpandcheck-dod.phpread, withexit <code>asthe last line. It prints one line per tool: the exit code, the result and the log file. A tool that
did not start shows as "did not run".
tool-invocation.json: the sniffer entry point (detectedor given), the test environment variables and the codecept options. Later runs use the pin.
compare-tool-runs.php(upgrade) prints one verdict line per tool and only the new PHPStan errors,sniffer violations, evaluator findings and failing tests per suite. The baseline is the
*-post-tooling.txtfile when it exists, else the Phase 0 file. Exit 0 = no regression, 1 =regression, 2 = usage error or a missing baseline.
tool-output.phpholds the output parsing thatcheck-baselines.phpandcompare-baselines.phpnowshare.
compare-baselines.phpkeeps its file names, output lines and exit codes.read the summary, and open a log file only for the failing part.
Effect
On a booted demo shop, one run of PHPStan, the sniffer and the evaluator writes 119,760 bytes of log.
The agent now sees 549–784 bytes per run and 393 bytes per comparison.
Not in this PR
npm run yvesand the others) still print their full output.Checks
php bin/lint-plugins.php: Plugin lint passed (0 warnings).php bin/lint-hook-parity.php: Hook files agree (2 events).bash tests/scripts/test-sync-rules.sh: All assertions passed.php plugins/spryker-ai-dev-sdk/hooks/hooks.test.php: 42 checks, 0 failed.php plugins/spryker-ai-dev-sdk/skills/spryker-upgrade/scripts/upgrade-scripts.test.php: 260 checks, 0 failed.php tests/scripts/feature-install/feature-install.test.php: 134 checks, 0 failed.