Skip to content

DO NOT MERGE: revert proofs for #6593, round 4 - #6628

Closed
erikdarlingdata wants to merge 12 commits into
devfrom
train/6593-proof-4
Closed

erikdarlingdata wants to merge 12 commits into
devfrom
train/6593-proof-4

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Claude posting for Erik Darling.

This PR exists only to run CI with the listed reverts for #6593, and is closed after. Round 4 of 4.

Revert File Test expected to fail
Remove the set_notification_route_agent call in CreateNotificationRouteAsync DarlingMcpAlertTools.RouteAdmin.cs AnOperatorToken_CreatesARouteAtLevel1_* (stored level and journal count)
Level 3 refusal back in AgentFieldRefusal DarlingMcpAlertTools.RouteAdmin.cs AnOperatorToken_SetsLevel3_* (created)

The two run together because the level 3 refusal stops the create before the agent call, and the level 1 test never reaches the refusal.

…#6542 part 2)

create_notification_route and update_notification_route take agent_level, the four limits and
fallback_route_id for a named operator token only, checked with NotificationRouteWriter.Validate and
written by config.set_notification_route_agent, which journals route_agent_changed as operator:<name>.
Level 3 is refused over MCP, and a route at level 3 is not changed over MCP. Early agent refusals
journal under the agent token's name. A named token's resolve error names its own setting.
…6542 part 2)

MCP is full admin: the level 3 refusals are removed from the tool and the store function, and the
test now asserts level 3 is set, changed and lowered by an operator token, each change journaled.
…ields (#6542 part 2)

Agreed with the coordinator: under R2 of #5632 that token never holds the investigation tools, so it
sets agent levels 0 to 3 and edits agent routes like a named operator token. Its journal actor is
operator: plus the token identity the route write logs already carry. A token served the
investigations sets no agent field.
…ames a match change (#6542 part 2, review round 1)

M2: config.update_notification_route and config.set_notification_route_destinations take the actor the
service passes. They change a route with an agent setting only for an operator: actor and refuse every
other caller with DL403, as set_notification_route_agent does. The old signatures are dropped in the
managed batch and in tools/provision-roles.sql, so neither stays callable. set_notification_route_enabled
and set_notification_route_fallback hand an operator token's change to an agent route to the same path.

L2: update_notification_route returns the row before the change, and set_notification_route_agent journals
it as the before, so one call that changes metric_match and agent_level journals both, as the Viewer does.

L3: a theory over the kill and PostgreSQL kill refusals made before the gate, and one tools/call through
the host with a named agent token, each asserting the journal row names the token.

L1 and M1: the test comment and the ServerActionGate comment now say what holds.
… review round 1)

"v_changed || 'agent_level'" reads the literal as a text array and fails with
"malformed array literal", so every journaled agent change rolled back. Checked against a
throwaway PostgreSQL 16 container.
One conflict, in DarlingMcpHostGateLiveTests.cs: this branch's new
NamedTokensThatCannotBeServed_WithNoLegacyToken_StopTheStart test is kept,
and the source-text test TryStartServerAsync_ResolvesTheLoopbackOnlyToken,
which dev removed in #6507, stays removed.
ScalarAsync turns a boolean into "True", so the enabled and send_resolutions
asserts compared "true" with "True" and failed (Darling PG tests shard 1).
Both reads now cast to text, as the test's other reads do. The send_resolutions
read was after the failing line, so it had not run yet.
…ields

# Conflicts:
#	Darling/PerformanceMonitor.Darling.Service/Mcp/DarlingMcpAlertTools.cs
- DarlingMcpAlertTools.RouteAdmin.cs: the create-path set_notification_route_agent call removed
- DarlingMcpAlertTools.RouteAdmin.cs: AgentFieldRefusal refuses level 3 again

(cherry picked from commit e692aa1)
@erikdarlingdata

Copy link
Copy Markdown
Owner Author

Claude posting for Erik Darling. Revert proof round done. The results are in #6593's body. Closing without merge.

@erikdarlingdata
erikdarlingdata deleted the train/6593-proof-4 branch October 23, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant