fix: keep a stored enforce-all value buildable - #887
Open
ppat wants to merge 1 commit into
Open
Conversation
PR #884 retired the "enforce-all" mode and mapped the stored value to "enforce" in local.validated_watchdog_mode, so that a workspace which had asked for more enforcement would not silently get none. Verified on a live disposable workspace, that mapping never runs: Coder validates a build's parameter values against the target template version's option list before Terraform is planned, so a workspace carrying "enforce-all" is refused outright - parameter validation failed can't validate build parameter "Memory Watchdog": parameter value must match one of options: [observe enforce] - and `coder update` stops the workspace, prompts for a replacement value, and errors out non-interactively. Autostart and every scripted `coder start` fail the same way. The failure is loud rather than silent, so nothing degrades to "observe"; what breaks is the build, and the mapping the PR added is dead code. Restore "enforce-all" as an explicitly deprecated option so the value stays buildable and the mapping becomes reachable. Remove the option once no workspace stores the value. Also record the 2026-08-22 live drill in TESTING.md, which is where this was found. That drill is the first to exercise the envelope construction, the oversize/drift split, the treeHelper role and the structural exclusion of an unrecognised direct child of the server root against real processes; its action lines are in Loki and its sweep rows, correctly, are not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197hA8JPwGMX8wufiQiy6oz
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.
What this fixes
#884 retired the
enforce-allwatchdog mode and added a mapping inlocal.validated_watchdog_modeso that a workspace still carrying the stored value would be treated asenforce— "because it had asked for more enforcement and must not silently get none."Verified on the disposable
testworkspace: that mapping never runs. Coder validates a build's parameter values against the target template version's option list before Terraform is planned, so a workspace whose stored value isenforce-allcannot be built on the #884 template version at all:coder updatestops the workspace, prompts for a replacement value, and errors out non-interactively; autostart and every scriptedcoder startfail the same way.The failure is loud, not silent — nothing degrades to
observe. What breaks is the build, and the mapping #884 added is dead code.The change
Restore
enforce-allas an explicitly deprecated option so the value stays buildable and the existing mapping becomes reachable. The comment now records why the option has to stay. Remove it once no workspace stores the value.Also
TESTING.md's drill record is replaced with the 2026-08-22 run, which is where this was found. It is the first drill to exercise, against real processes:floored=/resting-floor artifactsoversizevsdriftsplit — processes born above their share reported every dwell period and never signalled; processes seen fitting and then drifting out killed, withTERM→KILLescalation and correct re-arming perpid:starttimeacross respawnsevent=kill-rate ... enforcing=yesat both the per-role and the cross-role threshold, with enforcement continuing after eachtreeHelperrole, its<extension>/<script>identity, and fix: govern the in-tree helpers the watchdog could not name #881's structural exclusion of an unrecognised direct child of the server rootpid1,self,comm,argv0) and the session-boundary exclusion of asetsid-detached processAction lines reached Loki; sweep rows, correctly, did not.
Testing
pre-commit run --all-filesgreen at the base commit and after the change.f8cc458.🤖 Generated with Claude Code
https://claude.ai/code/session_0197hA8JPwGMX8wufiQiy6oz