chore: release v0.5.124#498
Draft
gonewton-deploy[bot] wants to merge 1 commit into
Draft
Conversation
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.
Automated release for version 0.5.124
This PR was created by the auto-release workflow. Merging it brings
the bumped version back into
main.What triggered this release:
Commit: c8851c8
Message: fix: tranche 4 audit remediation — smells & hygiene (spec 074) (#497)
Implements Tranche 4 ("smells & hygiene") of the audit remediation spec
(074, local), following tranches 1 (#491), 2 (#493), and 3 (#495). Ten
work items plus a code-review pass with fixes.
Changes
workflow-run artifacts under
crates/cli/.newton/, fixed.gitignore's.newton/*root-only anchoring (**/.newton/*+ a!**/.newton/scripts/**exception), deleted three empty/abandoneddirectory skeletons and two throwaway files, deleted-or-implemented
scripts/linter.sh, fixedarchitecture.md's operator table anddocs/realtime.md's stale event-type documentation.unused
clapderives/attributes fromcrates/cli/src/cli/args.rs(keptas plain DTOs — real parsing is
cli-framework's ArgSpec layer),removed the now-unused
clapdependency, movedassessment.rstoworkflow/grading/(it's a helper library, not an operator).gh_authorization.rswas not deleted — investigation showed it'sload-bearing (
GhOperator's real authorization flow, 65 passing tests)despite the audit's premise that it was orphaned.
model_stylesheet.context_fidelityis set to a non-default value thathas no effect yet; purged the removed
monitorCLI command from skillmetadata; wired the previously-discarded
_terminal_stopsignal into anew
WorkflowExecution.terminal_stopfield (kept the losslessWorkflowExecutionStatusmapping from S11 intact — added a field ratherthan a new status variant).
DbSink/ServerNotifierwerealready consolidated to one
WorkflowSinktrait with two impls by anearlier tranche (premise correction — the audit's "collapse to one
trait" text no longer matched current code); this item's remaining scope
was replacing
let _ =-swallowed channel-send failures withtracing::debug!-logged failures.spawn_blockingfor workflow-file I/O (S10): all fiveworkflow-filesaxum handlers (list/get/put/delete/validate) wrap theirblocking
std::fscalls andrun_diagnostics' parse/validate/lint intokio::task::spawn_blocking, following the codebase's existingouter-JoinError/inner-Result idiom.
FindingStatus(8 canonicalCONTEXT.md variants),
Severity, andOriginreplaceStringfieldson
FindingItem/CreateFindingBody/PatchFindingBody.finding_row_to_item(the store boundary) parses DB strings viaFromStr, treating an unparseable value as store corruption rather thansilently coercing it. Deleted the now-redundant
FINDING_STATUSESallowlist (it only covered 5 of 8 canonical statuses) — invalid values
are now rejected at the type level.
reconcile.rs'sis_open_statustakes
&FindingStatuswith an exhaustive match, the actual mechanismbehind "the compiler owns what
is_open_statusapproximates."Product/Component/Repo/ModuleDependency's read routes(previously split across
dashboard.rs/portfolio.rsfrom their CRUDin
catalog.rs) are now colocated under one"catalog"OpenAPI tag.Added
limit/offsetpagination (default 100, hard cap 1000) to thepreviously-unbounded
kpis/modules/plans/products/components/regressionslistendpoints named by the audit.
silently-swallowed stdout/stderr capture write (
let _ = write_all(...)) now tracks its failure reason and appends a[capture truncated: <reason>]marker to the artifact file — covering bothgenuine I/O failures and the pre-existing byte-cap cutoff, neither of
which used to leave any trace. The truncation reason also surfaces on
the task's own output JSON
(
stdout_capture_warning/stderr_capture_warning) since no per-task"warnings" channel exists on
ExecutionContext. Replaced the two.expect("stdout/stderr must be piped")panics on the subprocess hotpath with typed
AppErrors.env()opt-in per workflow (S8, part 1):ExpressionEngine::default()no longer registersenv()— expressionevaluation is deterministic unless a workflow explicitly sets the new
settings.allow_env_fn: true. Threaded through all real-execution callsites (
child_runner.rs,newton run'sloader.rspath,newton optimize's workflow driver) while validation/lint/explain paths staydeterministic by design.
LlmAdjudicator/AgentClienttrait injection (S8, part 2):ReconcileOperator,GraderAgentOperator, andChangeRequestOperatorno longer call
aikit_sdk::AgentRunner/Pipelinedirectly insideexecute()— a newllm_client.rsmodule defines the two seams, eachwith a real implementation that moves the prior
spawn_blockingbodyunchanged, and each operator gains an additive
with_adjudicator/with_agent_clientconstructor (the plain::new()and every existing test are untouched). This is the actual enabler for
testing B2's failure path (adjudication failure must fail closed with
zero Finding mutations) — previously only reachable via a real LLM call
failing.
audit's premise didn't fully hold —
create_component_db/create_repo_db/create_module_db/create_eval_run_db/create_grade_dbalready validate their FKs transactionally and return a clean 404, so
the axum handlers and
dispatch_data's real write path were neveractually duplicating broken validation. The one real, still-live
duplication was narrower: the CLI's
--dry-runblock hand-rolled itsown separate copy of the same "does this FK exist" checks. Extracted
those into
crates/backend/src/service.rs(validate_*_fks, fiveresources) and wired
--dry-runto call them, collapsing ~115 lines ofhand-rolled match arms. Deliberately not wired into the real write paths
(would reintroduce a TOCTOU gap for no behavioral gain).
Review (8-angle, high effort)
8 finder angles (line-by-line, removed-behavior, cross-file tracer,
reuse, simplification, efficiency, altitude, conventions) plus targeted
verification. Fixed on-branch:
env()opt-in didn't reach real execution (found by thecross-file tracer, independently confirmed by direct code reading):
apply_default_pipeline— which runs themacro-expansion/
include_if/template-interpolation transforms — wascalled before the settings-aware
ExpressionEnginewas built inchild_runner.rs/optimize.rs, and each of those three transformsconstructed its own always-deterministic engine. A workflow that opted
in via
settings.allow_env_fn: truewould still fail to load if it usedenv()inside a template string, macro argument, orinclude_ifcondition (as opposed to a task's own
$exprparam, which workedcorrectly). Threaded
allow_env_fnthroughapply_default_pipeline'ssignature into all real-execution call sites — this also caught a third
genuine execution path,
loader.rs'sload_and_lint_workflow(used bynewton rundespite its lint-sounding name), that the original S8 workmissed. Validation/lint/explain paths explicitly stay deterministic
(documented at each call site). New regression test proves both
directions: fails without the opt-in, works with it.
CreateFindingBody/PatchFindingBody'sstatus/severity/originasenums moved invalid-value rejection into serde deserialization inside
axum's
Json<T>extractor — before the handler runs, and before thisAPI's usual
ApiErrorJSON envelope gets applied. A bad value onPOST /findings/PATCH /findings/{id}fell through to axum's defaultplain-text rejection instead. Added
AppJson<T>, a drop-inFromRequestwrapper mappingJsonRejectionto a 422ApiError,adopted by the two Finding handlers that surfaced the bug (kept as a
reusable primitive; adopting it repo-wide is a documented follow-up, not
needed by any other endpoint today).
/reposand/module-dependenciesmissing pagination: these twoendpoints were relocated into
catalog.rsby the same S12route-colocation work but never got the
limit/offsettreatment theirnewly-adjacent siblings received. Applied the same pattern.
command.rsandsdk.rs: a coverage-gap-closing commit had already extractedwrite_capture_chunkinsidesdk.rsto deduplicate three copies there,but left
command.rs's two structurally-identical inline copiesuntouched — confirmed by two independent finder angles, and by git
history showing the exact same commit introduced both files'
duplication. Moved the helper to
artifacts.rs(which both filesalready import from) so both share one implementation.
FindingStatus/Severity/Origin::as_str()methods had no///doccomments.
Investigated and refuted or deliberately deferred:
--port/--formatsilent-default-instead-of-error,
--parallel-limit/--timeout/--lastnegative-value integer-wraparound bypassing validation) were flagged by
two finder angles reading adjacent code for context — all four confirmed
real, but confirmed via
git diff main...HEAD --statto live in filesthis branch never touches (
framework_setup/mod.rs,commands/serve.rs,commands/workflow.rs), pre-existing onmainsince tranche 3. Out of scope for this PR; worth a follow-up ticket.
change_request_op.rsseverity-fallback behavior change(garbage
min_severitysilently landing on a more permissive rank thanbefore) was refuted — the pre- and post-enum fallback both land on rank
4; the reviewer conflated it with an unrelated function's
.unwrap_or(2).RealLlmAdjudicatorduplicatingRealAgentClient'sspawn_blockingbody instead of delegating to it, and
workflow_files.rs's 5x-repeatedspawn_blocking+JoinErrortriad, are real but lower-severity — leftas documented follow-ups rather than expanding this PR further.
Finding/ChangeRequestFK-validation asymmetry (they still lackthe pre-check the 5 covered resources have, so a bad FK still surfaces
as a raw 500 rather than a clean 404) is real but pre-existing, not
introduced by this branch — the S5 commit's premise only checked the 5
resources it covers, not these two. Documented follow-up.
rather than pushing
LIMIT/OFFSETinto SQL is a deliberate,already-documented tradeoff from the S12 work (pushing to SQL would
require changing the
BackendStoretrait and its CLI/grading call sites— out of scope for a hygiene fix on tables that aren't expected to be
large).
Verification
-D warningsclean; fullcargo test --workspacegreen after everycommit, independently re-verified (not just trusting subagent
self-reports) at each of the 10 work items plus the coverage-gap and
review-fix commits.
main) — an initial pass measured 88.54%; closed the gap with targetedtests (the
AgentClient/LlmAdjudicatorreal-implementation errorpaths via the established "non-runnable engine" test trick, the S15
truncation-marker branches via a real over-cap subprocess and a
helper-level unit test,
FindingStatus/Severity/Originround-triptests, and
spawn_blockingJoinError-mapping tests via a panickingstore test double).
findings; 5 confirmed issues fixed on-branch (above).
context_fidelitylint / monitor purge /terminal_stop,originally 90 characters) exceeded NEWTON-0009's 72-char subject limit —
fixed via scripted
git rebase -ireword before push, contentbyte-identical.
Known follow-ups (documented, not blocking)
incidentally during review (silent-default-on-invalid-value for
--port/--format, integer-wraparound-bypasses-validation for--parallel-limit/--timeout/--last) — live in code this branchnever touches, predate tranche 4 entirely; worth a dedicated follow-up.
Finding/ChangeRequestcreation still has no FK pre-check (unlikethe 5 resources S5 covers) — a bad
componentId/repoId/kpiIdonPOST /findingssurfaces as a raw 500 rather than a clean 404.RealLlmAdjudicator::adjudicateduplicatesRealAgentClient::run_pipeline'sspawn_blockingbody rather thandelegating to it with adjudication-specific template/schema/parsing — a
~45-line reduction is available.
workflow_files.rs'sspawn_blocking+JoinErrorthree-way match isrepeated at all 5 handler call sites; only the join-error arm is truly
shared logic across them.
AppJson<T>(the newJson<T>rejection wrapper) is adopted only bythe two Finding handlers that surfaced the bug; the rest of this API's
many
Json<T>extractors could adopt it for consistency, though nonehave this specific typed-enum-rejection issue today.
limit/offsetclamp logic(
DEFAULT_LIST_LIMIT/MAX_LIST_LIMIT/clamp helper) is duplicatedacross
catalog.rs/dashboard.rs/plans.rsrather than shared fromone location.
service.rs's FK-existence checks fetch a full row viaget_product/get_component/get_reporather than the cheaperrow_existsprobe already used for the same purpose elsewhere in thestore layer.