@@ -198,13 +198,8 @@ func TestIsFeatureEnabled_EmptyFlagName(t *testing.T) {
198198 assert .False (t , result , "Expected false for empty flag name" )
199199}
200200
201- // TestRequestDepsLockdownModeIsUpperBound verifies that, in HTTP mode, the
202- // server operator's --lockdown-mode / GITHUB_LOCKDOWN_MODE configuration is an
203- // upper bound: request-scoped configuration (the X-MCP-Lockdown header,
204- // surfaced as ghcontext.WithLockdownMode) may enable or tighten lockdown, but
205- // can never disable lockdown the operator has already turned on. Lockdown mode
206- // remains a best-effort content filter, not a security boundary — this test
207- // only asserts the on/off decision, not any content-filtering guarantee.
201+ // TestRequestDepsLockdownModeIsUpperBound verifies the X-MCP-Lockdown header
202+ // can only enable lockdown, never disable the operator's server-side setting.
208203func TestRequestDepsLockdownModeIsUpperBound (t * testing.T ) {
209204 t .Parallel ()
210205
@@ -284,30 +279,25 @@ func TestRequestDepsLockdownModeIsUpperBound(t *testing.T) {
284279 }
285280}
286281
287- // TestRequestDepsLockdownModeCannotBeDisabledByOmittingHeader is a focused
288- // regression test for the specific bug in #3104: previously, server-enabled
289- // lockdown mode was disabled for any request that did not also send the
290- // X-MCP-Lockdown header, letting a request silently opt out of an operator's
291- // security posture. A request simply omitting the header (as opposed to
292- // explicitly disabling it, which the header format does not support) must not
293- // relax lockdown mode below what the operator configured.
282+ // TestRequestDepsLockdownModeCannotBeDisabledByOmittingHeader is a regression
283+ // test for #3104: omitting the X-MCP-Lockdown header must not disable
284+ // server-enabled lockdown mode.
294285func TestRequestDepsLockdownModeCannotBeDisabledByOmittingHeader (t * testing.T ) {
295286 t .Parallel ()
296287
297288 resolver := newRequestDepsAPIHostResolver (t , "https://example.com" )
298289 deps := github .NewRequestDeps (
299290 resolver ,
300291 "test" ,
301- true , // server operator enabled lockdown mode
292+ true , // server- enabled lockdown
302293 nil ,
303294 translations .NullTranslationHelper ,
304295 0 ,
305296 nil ,
306297 testExporters (),
307298 )
308299
309- // No ghcontext.WithLockdownMode call: this is what happens when a request
310- // does not send the X-MCP-Lockdown header at all.
300+ // No X-MCP-Lockdown header sent.
311301 ctx := ghcontext .WithTokenInfo (context .Background (), & ghcontext.TokenInfo {Token : "request-token" })
312302
313303 flags := deps .GetFlags (ctx )
0 commit comments