Skip to content

[plan] Add field-level enforcement testing to smoke-safeoutputs-discussions after #23279 ships #23307

@github-actions

Description

@github-actions

Objective

Update the smoke-safeoutputs-discussions test to verify field-level enforcement for update-discussion once PR #23279 (filterToolSchemaFields()) ships.

Context

From issue #23283, finding #6:

PR #23279 adds filterToolSchemaFields() to hide unconfigured fields from the tool schema. Once that ships, the smoke test should be updated to test field-level enforcement (e.g., update-discussion with only allowed_labels should not allow body modification).

Currently update-discussion has no field-level controls in the config — all of title, body, and labels may be modified. The new infrastructure from #23279 will allow constraining which fields the agent can modify.

Approach

  1. Confirm PR Fix update_discussion safe outputs: label-only config must not modify title/body #23279 has shipped (check if filterToolSchemaFields() is available in update_discussion.cjs)
  2. Update the update-discussion config in smoke-safeoutputs-discussions.md to restrict fields, for example:
    update_discussion:
      max: 1
      target: created  # after companion issue is implemented
      allow_body: false
      allow_title: true
      allowed_labels: ["smoke-test", "general"]
  3. Update the agent prompt to attempt both allowed and disallowed operations
  4. Verify the smoke run shows:
    • Allowed field updates succeed
    • Disallowed field updates are rejected with a clear error message

Files to Modify

Acceptance Criteria

  • update-discussion config includes at least one restricted field (e.g., allow_body: false)
  • Agent prompt tests both allowed and disallowed field modifications
  • Smoke run confirms restricted fields are rejected with clear error messages
  • Smoke run confirms allowed field updates succeed

Dependencies

References

Generated by Plan Command for issue #23283 ·

  • expires on Mar 30, 2026, 1:55 AM UTC

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions