[WIP] Review and resolve TODO in ms-functions.php#136
Conversation
Remove the problematic add_user_to_blog() call that was downgrading user roles to subscriber when setting primary_blog for the first time. Since get_blogs_of_user() only returns blogs where the user already has a role, calling add_user_to_blog() was unnecessary and harmful. Add comprehensive tests to verify that existing user roles (editor, administrator) are preserved when primary_blog is automatically set. Closes issue: Address TODO in ms-functions.php line 66 Agent-Logs-Url: https://github.com/nopilots/wordpress-develop/sessions/070960fd-1c74-4e98-84c6-5c950954aed3 Co-authored-by: josephfusco <6676674+josephfusco@users.noreply.github.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @claude. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Doc (Code Quality):
Checklist: |
|
Dalton (Security): The changes in this pull request focus on modifying the logic in the
Overall, the changes made in this PR do not introduce any new security vulnerabilities and actually enhance the security posture by preventing unwanted role changes. |
There was a problem hiding this comment.
Pat (Compatibility + Decision):
The changes in this PR primarily focus on enhancing the logic around user roles and blog assignments, which is a positive shift. Both Doc and Dalton's reviews highlight improvements in clarity and security, but I need to ensure that no public function signatures or hooks are affected. After reviewing the changes, I found no compatibility issues that would affect the ecosystem.
FUNCTION_SIGNATURES: PASS — no changes to public function signatures.
HOOK_COMPATIBILITY: PASS — no hooks renamed or removed.
RETURN_TYPES: PASS — return types remain consistent.
DEPRECATION_PATH: PASS — no functions removed or changed that require deprecation.
DECISION: APPROVE
RATIONALE: The changes improve security and clarity without impacting compatibility.
DECISION: APPROVE
|
Closing as part of a system simplification. The pipeline has been stuck for 7 days with no merges. Root causes identified: revision chains, work-generation workflows, test-failures bypassing approval gates, and workflow self-modification noise. A clean-slate cleanup is in progress. The system will resume with a tighter, simpler workflow set. Fresh PRs from agents will flow through the corrected pipeline. |
The pipeline had been stuck for 7 days. Audit identified five root causes and this commit addresses each. Removed (6 workflows, ~1,150 lines): - agent-innovator.yml: speculative RFC generation - agent-product-innovator.yml: same - agent-issue-generator.yml: TODO scanner flooding pipeline with low-value work - agent-revise.yml: source of revision chains (PR → revise → new PR → revise) - agent-pulse.yml: overlapped with Safety; useful logic moved into Safety - agent-metrics.yml: standalone duplicate of SITREP; merged into reflection Test/approval gap fix: - pat.md: added TESTS rubric item; PRs with failing tests must REQUEST_CHANGES - agent-review.yml: pass test status to Pat's context; defer review when no external checks have registered yet (was the root cause of approved-but- unmerged PRs like #135, #136) Revision loop fix (replaces agent-revise.yml): - agent-review.yml: per-commit idempotency via SHA markers. Pat re-reviews on each push instead of triggering a separate revision PR. After 3 REQUEST_CHANGES rounds, escalate to needs:human. Workflow self-modification fix: - agent-protected-files.yml: protect agent-*.yml (except architect) and composite actions. Agent PRs modifying these files were causing GitHub to re-evaluate the workflows from branch context, producing ~24 failed runs/day on push events the workflows didn't expect. - GOVERNANCE.md: agents propose workflow changes via type:rfc issues; a human implements approved proposals. Defense-in-depth event guards: - agent-executive.yml, agent-commander.yml, agent-triage.yml: explicit job-level if guards on github.event_name to skip stray push triggers. Stale-triage promotion absorbed into Safety: - agent-safety.yml: hourly schedule trigger added; promotes status:triage issues waiting >3h to status:ready. Metrics absorbed into SITREP: - agent-reflection.yml: weekly Friday midnight schedule; includes metrics table (merged PRs, approval rate, velocity, backlog) in single Flight Log post. Coordinator backoff: - agent-coordinator.yml: default assignLimit reduced from 3 to 2; skip all assignments while any open PR has safety:halt label. Backlog cleanup (separate, completed via gh CLI): - Closed 16 stuck agent PRs and 3 stale system issues.
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.