Skip to content

[3510 by Claude Opus 5.5] Apply library extensions automatically to issue tasks and PR follow-ups, with label opt-outs - #3522

Merged
integry merged 2 commits into
3509-epic-extensions-library-14jfrom
3510/claude-opus-5-5-apply-library-extensions--20261113-0542-lwg
Nov 13, 2026
Merged

integry merged 2 commits into
3509-epic-extensions-library-14jfrom
3510/claude-opus-5-5-apply-library-extensions--20261113-0542-lwg

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3510

Branch: 3510/claude-opus-5-5-apply-library-extensions--20261113-0542-lwg
Commits: ✅ Changes committed (a7275d6)


AI Processing Completed

Execution Details:

Summary:
Issue #3510 is implemented. Label-started and New Task issue tasks (including retries and replacements) and PR follow-ups now get matching library items automatically, resolved when the container is created, with label opt-outs, the write rule, the Codex skip rule and the New Task changes. New and updated tests pass; I did not run the complete repository suite.

What a run gets

  • Who gets items: Issue tasks and PR follow-ups now resolve the current library at launch, so editing the library never invalidates a queued task. Only Claude and Codex task runs use it; other runtimes and goal runs launch as before.
  • What a follow-up covers: "PR follow-up" here means comment-driven follow-ups, /fix and Ultrafix fix steps. Review runs and Ultrafix review steps don't use the library.
  • Labels: disable-mcps, disable-skills and disable-extensions are shared constants. On the issue (or on the PR for follow-ups) they remove only their class of items, never add any, and don't affect automations. The labels are read when the job fetches the issue or PR, not with an extra GitHub call.
  • Write servers: exposed only on the first task of a New Task submission with the write opt-in. The opt-in is sealed into the submission and checked against the exact run. Label-started tasks, retries, replacements and follow-ups get read servers and skills only. If the check doesn't match, the run quietly gets read items instead of failing.
  • Codex: before launch, the worker checks two conditions: the operator config.toml defines a custom model provider or profile, or the workspace has .codex/config.toml. If either holds, the run launches without its auto-applied items and the task event records why. Items an automation adds explicitly keep today's strict behaviour.
  • Task event: each run records one event with the library revision, run kind, provenance (auto, additional or mixed, plus the revision's audit actor), applied server and skill names split into auto-applied and added, omitted and skipped items with reasons, and any label or Codex skip reason. No secrets or URLs. The grant records the same source.

New Task

  • The Advanced Options section lists, read-only, the items that will apply, using a new names-only endpoint, GET /api/task-submission-extensions.
  • It has a "Run without extensions" switch, which adds the disable-extensions label to the issue.
  • A write opt-in checkbox appears only when a write server applies. The API accepts the opt-in only with the X-ProPR-Extensions: 1 header, and not together with the disable switch.

Decisions for you

  • Who may opt into write servers: anyone with push access to the repository can tick the write opt-in. I did not require an instance administrator, which the old profile selection did. If write servers should stay admin-only, it's a small change, but the form would then need to know whether the user is an admin.
  • Fallback when the library can't be read: if the library can't be read at all (for example after a restore with mismatched revision identity), issue tasks and follow-ups launch without extensions and log a warning, instead of every task failing. This wasn't in the issue. Automations and explicitly added items still refuse, and disabling, deleting or rotating an item between preparation and container start still refuses the launch.
  • Queued pre-library submissions: these keep their explicit migrated items and do not also receive auto-applied ones.

Verification

  • New core suite extensionTaskAutoApply.test.ts (10 tests) covers the acceptance criteria, including the no-secrets sentinel and the adapted fencing test.
  • New API suite taskSubmissionExtensions.test.ts covers write-opt-in sealing, the disable label and the preview endpoint.
  • New integration test: a label-started task and a follow-up launch with auto-applied items through the real workflow wrapper.
  • I adapted two existing tests (the automation event shape, and the write opt-in now being valid). These pass: the other core extension tests, the affected API and root job suites, the UI tests, and the e2e agent-extensions.pw.ts (5/5).
  • Lint, typecheck and gen:openapi:check are clean.
  • Several of these suites finish all their tests but then don't exit and are stopped by a timeout. That matches an exit hang already known in this repo; it's not a test failure.

Docs and UI copy: agent-extensions.md covers auto-apply, the run table, labels, New Task, the event fields and the Codex rule. usage.md ("How Labels Work") and launching-work.md have the labels and the New Task options, and the Settings guide text is updated. The OpenAPI spec and client types are regenerated.

Previews of the New Task extensions panel at desktop and mobile width are attached.

Detailed Logs:

  • Conversation: 202 messages
  • Session: 503ed34b-c4b9-41aa-bf24-f588147ab68d

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3510-2026-11-13T06-38-38-952Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3510-2026-11-13T06-38-38-952Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: Issue #3510 is implemented. Label-started and New Task issue tasks (including retries and replacements) and PR follow-ups now get matching library items automatically, resolved when the container is c...


This PR was created automatically by ProPR after processing issue #3510.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!


Visual preview

New Task: extensions that will apply (desktop)

New Task: extensions that will apply (desktop)

Advanced Options now lists, read-only, the library MCP servers and skills that will apply for the chosen repository and agent, with the "Run without extensions" switch and the write opt-in (shown because a write server applies).

Connect sign-in required. Original retained until 2027-02-11T06:38:44.051Z.

View the full-resolution original in ProPR Connect

New Task: extensions that will apply (mobile)

New Task: extensions that will apply (mobile)

The same extensions panel at a 390px phone width.

Connect sign-in required. Original retained until 2027-02-11T06:38:45.122Z.

View the full-resolution original in ProPR Connect

…ncluding retries and replacements) and PR follow-ups now get matching library items automatically, resolved when the container is created, with label opt-outs, the write rule, the Codex skip rule and the New Task changes. New and updated tests pass; I did not run the complete repository suite.

What a run gets
- Who gets items: Issue tasks and PR follow-ups now resolve the current library at launch, so editing the library never invalidates a queued task. Only Claude and Codex task runs use it; other runtimes and goal runs launch as before.
- What a follow-up covers: "PR follow-up" here means comment-driven follow-ups, `/fix` and Ultrafix fix steps. Review runs and Ultrafix review steps don't use the library.
- Labels: `disable-mcps`, `disable-skills` and `disable-extensions` are shared constants. On the issue (or on the PR for follow-ups) they remove only their class of items, never add any, and don't affect automations. The labels are read when the job fetches the issue or PR, not with an extra GitHub call.
- Write servers: exposed only on the first task of a New Task submission with the write opt-in. The opt-in is sealed into the submission and checked against the exact run. Label-started tasks, retries, replacements and follow-ups get read servers and skills only. If the check doesn't match, the run quietly gets read items instead of failing.
- Codex: before launch, the worker checks two conditions: the operator `config.toml` defines a custom model provider or profile, or the workspace has `.codex/config.toml`. If either holds, the run launches without its auto-applied items and the task event records why. Items an automation adds explicitly keep today's strict behaviour.
- Task event: each run records one event with the library revision, run kind, provenance (`auto`, `additional` or `mixed`, plus the revision's audit actor), applied server and skill names split into auto-applied and added, omitted and skipped items with reasons, and any label or Codex skip reason. No secrets or URLs. The grant records the same source.

New Task
- The Advanced Options section lists, read-only, the items that will apply, using a new names-only endpoint, `GET /api/task-submission-extensions`.
- It has a "Run without extensions" switch, which adds the `disable-extensions` label to the issue.
- A write opt-in checkbox appears only when a write server applies. The API accepts the opt-in only with the `X-ProPR-Extensions: 1` header, and not together with the disable switch.

Decisions for you
- Who may opt into write servers: anyone with push access to the repository can tick the write opt-in. I did not require an instance administrator, which the old profile selection did. If write servers should stay admin-only, it's a small change, but the form would then need to know whether the user is an admin.
- Fallback when the library can't be read: if the library can't be read at all (for example after a restore with mismatched revision identity), issue tasks and follow-ups launch without extensions and log a warning, instead of every task failing. This wasn't in the issue. Automations and explicitly added items still refuse, and disabling, deleting or rotating an item between preparation and container start still refuses the launch.
- Queued pre-library submissions: these keep their explicit migrated items and do not also receive auto-applied ones.

Verification
- New core suite `extensionTaskAutoApply.test.ts` (10 tests) covers the acceptance criteria, including the no-secrets sentinel and the adapted fencing test.
- New API suite `taskSubmissionExtensions.test.ts` covers write-opt-in sealing, the disable label and the preview endpoint.
- New integration test: a label-started task and a follow-up launch with auto-applied items through the real workflow wrapper.
- I adapted two existing tests (the automation event shape, and the write opt-in now being valid). These pass: the other core extension tests, the affected API and root job suites, the UI tests, and the e2e `agent-extensions.pw.ts` (5/5).
- Lint, typecheck and `gen:openapi:check` are clean.
- Several of these suites finish all their tests but then don't exit and are stopped by a timeout. That matches an exit hang already known in this repo; it's not a test failure.

Docs and UI copy: `agent-extensions.md` covers auto-apply, the run table, labels, New Task, the event fields and the Codex rule. `usage.md` ("How Labels Work") and `launching-work.md` have the labels and the New Task options, and the Settings guide text is updated. The OpenAPI spec and client types are regenerated.

Previews of the New Task extensions panel at desktop and mobile width are attached.
@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=10
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 13, 2026
@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR connects issue tasks and PR follow-ups to library resolution, with scoped write authorization and useful coverage. It needs a localized correction before merge: the Codex conflict detector misses valid TOML configurations.

✅ Scoped write authorization — Submission authority is sealed and checked against the task, repository, issue, agent, model and payload; mismatches fall back without write authority.

✅ Label isolation — Opt-out filtering applies to issue and PR runs while preserving automation behavior, with tests covering all three labels.

This is a static review of the supplied code; no commands were run. The supplied checks show no failures and three pending checks.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Parse valid quoted TOML keys

  • Required behavior: Codex runs whose operator configuration defines a custom provider must skip auto-applied extensions so that enabling library items does not discard their provider configuration.

  • Evidence: packages/core/src/agents/impl/utils/codexExtensionConflict.ts:codexConfigDefinesProviderOrProfile

    1. An operator uses valid TOML literal keys: 'model_provider' = "azure" and 'model_providers' = { azure = { name = "Azure", base_url = "https://azure.example/v1", wire_api = "responses" } }.
    2. A Codex issue task has a matching auto-applied library item. Its execution invokes the new conflict detector.
    3. Neither configuration line matches the key regex, which accepts bare or double-quoted keys but not single-quoted keys. Neither is a table header, so the detector returns false.
    4. Extensions remain enabled. The supplied codexToolPolicyArgs consumer adds --ignore-user-config, discarding the configured provider. The task consequently loses its intended provider routing and can fail authentication or run against the wrong provider.

    static trace: The detector, Codex hook, extension-resolution branch and supplied CLI argument consumer establish this sequence. Submission sealing and launch fencing do not validate TOML parsing. Existing detector tests cover single-quoted values, but not literal keys or literal-key inline provider definitions.

  • Minimum fix: Parse the operator configuration with a TOML parser and inspect the resulting top-level provider/profile fields. Add a regression covering literal keys and inline provider definitions.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Record library fallback durably

The unreadable-library branch in extensionLaunch.ts returns before recording a resolution event, leaving only a worker warning. Recording a sanitized fallback event would help users explain missing extensions from the task timeline. This is an optional observability improvement to the explicitly described fallback behavior.

Score

The implementation has substantial focused coverage and clear authorization boundaries, but the Codex configuration compatibility defect requires correction. Pending checks should also finish before merging.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 17s
  • Tokens: 73,782 (72,302 in / 1,480 out)
  • Cost: $0.69

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 S1

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 66c9d24

Addressed 1 AI review comment (IDs: 6846394651)

Addressed finding F1

Summary of Changes

I fixed F1: the Codex conflict detector now reads the operator config.toml with a real TOML parser instead of matching lines with a regex. Your example (literal keys 'model_provider' = "azure" plus an inline 'model_providers' table) is now detected, so that run launches without its auto-applied items and keeps its provider. Before, extensions stayed on and --ignore-user-config threw the provider away.

Change (packages/core/src/agents/impl/utils/codexExtensionConflict.ts)

  • The function parses the file and checks only four top-level fields. It reports a conflict if model_providers, profiles or profile is present, or if model_provider is set to anything other than a built-in provider (openai, oss, ollama, lmstudio).
  • Every way of writing a key is now handled: bare, double-quoted and single-quoted keys, dotted keys like model_providers.azure.name = …, inline tables, and quoted table headers like ['profiles'.'work'].
  • It no longer gets false positives from text inside multi-line strings, or from keys with the same name under other tables (e.g. [mcp_servers.docs]).
  • New dependency: smol-toml ^1.9.1 in packages/core. It has no dependencies of its own, and the lockfile only gains that one entry.

Decision for you: if the operator config can't be parsed as TOML, the detector now counts it as a conflict, so auto-applied items are skipped. I chose this because Codex already reads that file on today's runs, and dropping it silently could change what the run does. The alternative is to treat an unparsable file as no conflict and let auto-apply go ahead with --ignore-user-config. Tell me if you want that instead.

Same defect elsewhere: none. This is the only TOML reader in the PR. The other Codex skip condition (a workspace .codex/config.toml) only checks whether the file exists, and the entrypoint scripts don't parse TOML.

Verification

  • I added a regression test to packages/core/test/extensionTaskAutoApply.test.ts. It covers your example, single-quoted and dotted keys, inline tables, quoted headers, unparsable TOML, and the false-positive cases above. It also checks that codexAutoApplyConflict returns codex_operator_config for your example file.
  • All 11 tests in that suite pass with the fix. Against the old detector, your example and 'profile' = "work" both come back false, so the new test catches the original bug.
  • Core tsc --noEmit and core lint pass. Core's lint only covers src/, so the test file wasn't linted.

There's no visual change, so I didn't create a preview.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 8m 3s
  • Tokens: 986,403 (979,387 in / 7,016 out)
  • Cost: $0.57

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…tor `config.toml` with a real TOML parser instead of matching lines with a regex. Your example (literal keys `'model_provider' = "azure"` plus an inline `'model_providers'` table) is now detected, so that run launches without its auto-applied items and keeps its provider. Before, extensions stayed on and `--ignore-user-config` threw the provider away.

I fixed F1: the Codex conflict detector now reads the operator `config.toml` with a real TOML parser instead of matching lines with a regex. Your example (literal keys `'model_provider' = "azure"` plus an inline `'model_providers'` table) is now detected, so that run launches without its auto-applied items and keeps its provider. Before, extensions stayed on and `--ignore-user-config` threw the provider away.

**Change** (`packages/core/src/agents/impl/utils/codexExtensionConflict.ts`)
- The function parses the file and checks only four top-level fields. It reports a conflict if `model_providers`, `profiles` or `profile` is present, or if `model_provider` is set to anything other than a built-in provider (`openai`, `oss`, `ollama`, `lmstudio`).
- Every way of writing a key is now handled: bare, double-quoted and single-quoted keys, dotted keys like `model_providers.azure.name = …`, inline tables, and quoted table headers like `['profiles'.'work']`.
- It no longer gets false positives from text inside multi-line strings, or from keys with the same name under other tables (e.g. `[mcp_servers.docs]`).
- New dependency: `smol-toml` `^1.9.1` in `packages/core`. It has no dependencies of its own, and the lockfile only gains that one entry.

**Decision for you:** if the operator config can't be parsed as TOML, the detector now counts it as a conflict, so auto-applied items are skipped. I chose this because Codex already reads that file on today's runs, and dropping it silently could change what the run does. The alternative is to treat an unparsable file as no conflict and let auto-apply go ahead with `--ignore-user-config`. Tell me if you want that instead.

**Same defect elsewhere:** none. This is the only TOML reader in the PR. The other Codex skip condition (a workspace `.codex/config.toml`) only checks whether the file exists, and the entrypoint scripts don't parse TOML.

**Verification**
- I added a regression test to `packages/core/test/extensionTaskAutoApply.test.ts`. It covers your example, single-quoted and dotted keys, inline tables, quoted headers, unparsable TOML, and the false-positive cases above. It also checks that `codexAutoApplyConflict` returns `codex_operator_config` for your example file.
- All 11 tests in that suite pass with the fix. Against the old detector, your example and `'profile' = "work"` both come back `false`, so the new test catches the original bug.
- Core `tsc --noEmit` and core lint pass. Core's lint only covers `src/`, so the test file wasn't linted.

There's no visual change, so I didn't create a preview.

PR: #3522
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR extends library auto-application to issue tasks and PR follow-ups, with label opt-outs, sealed write authorization, Codex compatibility checks, and a names-only preview. No merge-blocking defect was verified from the supplied diff and context. It is merge-ready within the reviewed scope, conditional on pending checks completing successfully.

✅ Bounded write authorization — The worker checks sealed payload integrity and exact task, repository, issue, agent, and model identity before granting write access; mismatches fall back to read items.

✅ Controlled preview disclosure — The preview endpoint checks repository access and explicitly projects names and capabilities, excluding credentials and endpoints.

✅ Launch fencing coverage — Added tests exercise library changes between queueing and resolution, and refusal after selected items are disabled, removed, or rotated before launch.

This was a static review only; no commands or tests were run. The supplied current-head status reports 29 passed checks, five pending, and no failures.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S2: 🟢 Record library fallback in task history

In packages/core/src/extensions/extensionLaunch.ts, library-resolution failure returns before recording an extension event. A sanitized task-history entry would make this documented fallback visible to users without requiring worker logs. This is an optional observability improvement.

S3: 🟢 Exercise production job entry points

The added integration test constructs extension requests directly before invoking the workflow wrapper. Additional tests through the actual issue and PR-comment job entry points would help detect future failures to forward labels or submission authority. The current wiring is visible in the diff, so this is additional regression protection rather than a demonstrated blocker.

Score

The implementation has substantial focused coverage and no verified blocker within scope. Pending checks still need to complete; runtime behavior was not independently tested during this review.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 21s
  • Tokens: 72,777 (71,748 in / 1,029 out)
  • Cost: $0.66

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S2 S3

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 13, 2026
@integry
integry merged commit b11e51d into 3509-epic-extensions-library-14j Nov 13, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant