Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(daemon): resolve contradictory reply and precedence rules in runtime brief (MUL-9092) (#10409)
Jiayuan Zhangc575443bbd98
diff --git a/server/internal/daemon/execenv/runtime_config_sections.go b/server/internal/daemon/execenv/runtime_config_sections.goindex 77191e968f..1afa5d2664 100644--- a/server/internal/daemon/execenv/runtime_config_sections.go+++ b/server/internal/daemon/execenv/runtime_config_sections.go@@ -554,7 +554,7 @@ func writeInstructionPrecedence(b *strings.Builder) {b.WriteString("## Instruction Precedence\n\n")b.WriteString("Agent Identity instructions have priority over the issue workflow below. ")b.WriteString("If a workflow step conflicts with Agent Identity, skip the conflicting action and continue with the remaining compatible steps. ")- b.WriteString("Never treat this runtime workflow as permission to change issue status, investigate, implement, create issues, update issues, delegate, or otherwise act beyond your Agent Identity.\n\n")+ b.WriteString("The workflow never widens what your Agent Identity allows: when it forbids changing issue status, investigating, implementing, creating issues, updating issues, delegating, or any other action, skip that action.\n\n")}// SessionContinuityNotice variants describe missing provider working memory.@@ -952,7 +952,7 @@ func writeOutput(b *strings.Builder, kind taskKind, ctx TaskContextForEnv) {} else {b.WriteString("⚠️ **Final results MUST be delivered via `multica issue comment add`.** The user does NOT see your terminal output or run logs — only comments on the issue.\n\n")}- b.WriteString("**Post exactly ONE comment per run — your final result, before this turn exits.** Do NOT post progress updates or plans along the way. Only a scheduled wakeup check whose `[WAKEUP]` block offers `multica issue wakeup checkin` may check in instead of commenting, when it found nothing that needs a reply.\n\n")+ b.WriteString("**Post only your final result, before this turn exits — one comment, or one reply per thread when the per-turn message lists several threads.** Do NOT post progress updates or plans along the way. Only a scheduled wakeup check whose `[WAKEUP]` block offers `multica issue wakeup checkin` may check in instead of commenting, when it found nothing that needs a reply.\n\n")b.WriteString("Keep comments concise and natural — state the outcome, not the process.\n\n")b.WriteString("**Delivering files here:** pass `--attachment <path>` to `multica issue comment add` (repeatable) — the only way a screenshot or artifact reaches the reader.\n")writeInlineBlocksPolicy(b)diff --git a/server/internal/daemon/execenv/runtime_config_test.go b/server/internal/daemon/execenv/runtime_config_test.goindex bcfc40efcc..00a021ecaf 100644--- a/server/internal/daemon/execenv/runtime_config_test.go+++ b/server/internal/daemon/execenv/runtime_config_test.go@@ -509,7 +509,7 @@ func TestIssueWorkflowHonorsAgentIdentity(t *testing.T) {// One enumeration, in Instruction Precedence, covering every action// type Agent Identity can forbid. This and workflow step 3 each used to// carry their own list and the two disagreed (MUL-5442).- "Never treat this runtime workflow as permission to change issue status, investigate, implement, create issues, update issues, delegate, or otherwise act beyond your Agent Identity.",+ "The workflow never widens what your Agent Identity allows: when it forbids changing issue status, investigating, implementing, creating issues, updating issues, delegating, or any other action, skip that action.",// MUL-5442 (carried through MUL-6417): the forbids-clause is stated// once on the status-rule header instead of once per status bullet."skip any status call your Agent Identity forbids",@@ -527,6 +527,10 @@ func TestIssueWorkflowHonorsAgentIdentity(t *testing.T) {}for _, banned := range []string{+ // Read unconditionally, this denied investigating and implementing+ // even to agents whose identity forbids neither, against step 3's+ // "complete the task" (MUL-9092).+ "Never treat this runtime workflow as permission","4. Run `multica issue status " + issueID + " in_progress`\n","5. Follow your Skills and Agent Identity to complete the task (write code, investigate, etc.)","8. When done, run `multica issue status " + issueID + " in_review`\n",@@ -628,7 +632,7 @@ func TestInstructionPrecedenceOnlyAppliesToIssueWorkflow(t *testing.T) {for _, banned := range []string{"## Instruction Precedence","issue workflow below",- "Never treat this runtime workflow as permission to change issue status",+ "The workflow never widens what your Agent Identity allows",} {if strings.Contains(out, banned) {t.Errorf("%s brief must not inherit issue-only precedence text %q\n---\n%s", tc.name, banned, out)@@ -675,7 +679,8 @@ func TestChatOutputDoesNotRequireIssueComment(t *testing.T) {// this rule. Runs both the legacy and slim paths.func TestOutputForbidsMidRunProgressComments(t *testing.T) {wantPhrases := []string{- "Post exactly ONE comment per run",+ "Post only your final result, before this turn exits",+ "one reply per thread when the per-turn message lists several threads","Do NOT post progress updates",}issueCtxs := map[string]TaskContextForEnv{@@ -691,6 +696,11 @@ func TestOutputForbidsMidRunProgressComments(t *testing.T) {t.Errorf("%s/%s brief missing output rule %q\n---\n%s", label, name, want, out)}}+ // A multi-thread run is told to post one reply per thread; a+ // per-run cap of one comment contradicted it (MUL-9092).+ if strings.Contains(out, "exactly ONE comment per run") {+ t.Errorf("%s/%s brief still caps a run at one comment\n---\n%s", label, name, out)+ }}// Chat keeps its own delivery channel; it must not inherit the// issue-task "post a final comment" rules.