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.
Make
agentics-maintenance.ymlheader maintenance-specific #40706New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make
agentics-maintenance.ymlheader maintenance-specific #40706Changes from all commits
497b18dFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/improve-codebase-architecture] Header contract assertions are appended to
TestGenerateMaintenanceWorkflow_OperationJobConditions— a test whose name (and the lines that follow) are about job conditions, not header content. Future readers of this test won't expect header checks here, and a header wording change would surface as a confusingly-named test failure.💡 Suggestion: dedicated header test
Extract these four assertions (and any future header assertions) into a new function:
Keeping the header contract in its own test makes the intent clear and isolates header failures from job-condition failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header assertions bolted to an unrelated test: these four
require.Containschecks verify header content but live insideTestGenerateMaintenanceWorkflow_OperationJobConditions, which is scoped to operation job conditions.💡 Suggested fix
Move the assertions into a dedicated test, either a new
TestGenerateMaintenanceWorkflow_HeaderContentor a short test nearTestGenerateMaintenanceWorkflow_WithExpires. That way, when the header text changes and CI fails, the test name immediately identifies it as a header regression rather than a job-conditions failure.The current placement is not a correctness bug — the assertions do protect the right contract — but poor test naming will slow down diagnosis when the header changes again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/tdd] The test asserts that new strings are present, but doesn't verify that the old generic header content is absent. If the generator were to accidentally emit both the old and new headers, all four assertions would still pass.
💡 Suggestion: add a negative assertion
Add one
require.NotContainsto lock out the old content:This makes the test a true before/after contract rather than only a presence check.
Uh oh!
There was an error while loading. Please reload this page.