Skip to content

feat(github): implement native devops cli functionality for gh operations and pr governance (#181) - #187

Merged
dan-petty merged 11 commits into
release/v0.2.17from
feat/181-native-gh-cli-pr-governance
Sep 13, 2026
Merged

dan-petty merged 11 commits into
release/v0.2.17from
feat/181-native-gh-cli-pr-governance

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary

Implement native devops-cli commands and FastMCP tools replacing raw gh and gh api invocations, providing automatic REST API fallbacks on GraphQL rate limits, PR lifecycle controls, workflow run inspection, and resolving the K8s Loki sidecar crashloop.

Closes #181

…ions and pr governance (#181)

- Implement native devops pr ready, diff, and close subcommands
- Implement native devops gh rate-limit and runs subcommands
- Register FastMCP tools pr_ready, pr_diff, pr_close, gh_rate_limit, gh_runs_list, gh_run_view
- Harden config discovery and add pytest safety barrier against workspace config mutations
- Configure squid k8s deployment to use internal registry alias registry.local:5000
- Add comprehensive test coverage and documentation updates
…and resolve loki crashloop (#181)

- Fall back to REST API in devops pr view and devops pr checks when GraphQL rate limits are exceeded
- Add devops pr edit and devops gh issues edit subcommands
- Register FastMCP tools pr_edit and gh_issue_edit
- Disable loki-sc-rules sidecar in dev cluster k8s/logging/loki-values.yaml to eliminate k8s API watch crashloop
- Add unit tests for pr/issue edit and REST fallbacks
Copilot AI lite review requested due to automatic review settings September 13, 2026 13:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved critical and moderate security, correctness, deployment, and governance findings remain.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Implements native GitHub/PR governance commands, FastMCP integrations, REST fallbacks, workflow inspection, and Kubernetes updates.

Changes:

  • Adds PR lifecycle, workflow, rate-limit, and issue-edit commands.
  • Adds FastMCP tools, documentation, and tests.
  • Updates configuration safety and Loki/Squid manifests.
File summaries
File Summary and final findings
tests/test_pr_cmd.py Adds PR command and fallback coverage.
tests/test_k8s_context.py Uses explicit Kubernetes configuration fixtures.
tests/test_gh_cmd.py Tests rate-limit, workflow, and issue commands.
tests/test_fastmcp_contracts.py Adds MCP registration tests. Moderate, 1 vote: tests do not cover argument mapping, defaults, bounds, or optional flags.
src/devops_cli/lang/en/messages.py Adds PR status messages.
src/devops_cli/lang/en/help.py Adds command help text.
src/devops_cli/config/settings.py Adds configuration-path protection. Moderate, 3 votes: uses bare RuntimeError instead of the required domain error.
src/devops_cli/commands/pr.py Implements PR lifecycle commands and REST fallbacks. Moderate, 1 vote each: successful pr view and pr checks discard stdout. Critical, 3 votes: ready verification fails open. Moderate, 3 votes: pending checks are displayed as failures. Critical, 2 votes: PR bodies are rendered without sanitization. Critical, 1 vote: diffs are rendered without sanitization. Moderate, 1 vote: rate-limit errors omit reset information. Critical, 1 vote: GitHub diagnostics are displayed without masking and bounds.
src/devops_cli/commands/gh.py Implements rate-limit, workflow, and issue commands. Critical, 2 votes: failed workflow logs are not sanitized. Moderate, 3 votes: advertised output formats are not fully handled or validated.
src/devops_cli/ai/mcp/server.py Adds MCP GitHub tools. Moderate, 3 votes: monitor mode uses an incompatible short timeout. Critical, 1 vote: workflow output is exposed without secret masking.
README.md Updates the CLI command matrix.
k8s/squid/deployment.yaml Changes the Squid image source. Critical, 3 votes: uses an environment-specific private/local registry endpoint.
k8s/logging/loki-values.yaml Disables the Loki rules sidecar.
docs/MCP_TOOLS.md Documents new MCP tools.
docs/commands/pr.md Documents PR commands.
docs/commands/gh.md Documents GitHub commands.
docs/CLI_REFERENCE.md Updates the CLI reference.
docs/agent/tasks/task-181-native-gh-cli-pr-governance.md Tracks implementation objectives.
docs/agent/task.md Updates the task index.
AGENTS.md Updates GitHub governance guidance. Moderate, 1 vote: generated agent instructions still emit raw GitHub CLI commands.
Review details

Suppressed comments (6)

AGENTS.md:164

  • The new governance text is not propagated to generated agent instructions: src/devops_cli/ai/instruction_generator.py still emits gh api rate_limit, gh pr ready, gh run view --log-failed, and gh pr checks (lines 262, 298, 300, and 318). A subsequent devops ai agents run will therefore continue directing sessions to the raw commands this policy is meant to replace. Update the generator and remaining operational guidance before treating native-command governance as complete.
      - **Mandatory Conversion to Ready for Review**: Once all implementation logic, test-first coverage ($\ge 90\%$), documentation synchronization (`devops docs generate --sync-readme`), and local/remote CI quality gates pass cleanly, and all initial review comments are addressed, AI agents **MUST PROGRAMMATICALLY MARK THE PULL REQUEST AS READY FOR REVIEW** (`devops pr ready <pr-number>` or FastMCP `pr_ready`).
      - **CRITICAL REST API DRAFT LIMITATION**: GitHub's REST API (`PATCH /repos/{owner}/{repo}/pulls/{number}`) silently ignores `draft: false`. Converting a draft PR to ready can **ONLY** be executed via GitHub GraphQL mutation `markPullRequestReadyForReview` (invoked natively by `devops pr ready <pr-number>` or FastMCP `pr_ready`) or via the GitHub web UI. AI agents **MUST NEVER** attempt `gh api -X PATCH ... -f draft=false` or assume that a REST 200 OK converted a draft. Agents must always verify ground-truth draft status (`draft == false`) before declaring review readiness.

src/devops_cli/commands/gh.py:1115

  • This workflow-list option has the same contract mismatch: the documented format choices include YAML and Markdown, but every non-json value falls through to table rendering without validation. A caller can receive a successful response in the wrong format; implement the advertised serializers or reject unsupported formats consistently.
    if output_format == "json":
        from devops_cli.output import print as print_out

        print_out(json.dumps(runs, indent=2))
        return

src/devops_cli/commands/pr.py:281

  • On a successful gh pr view, this branch returns without writing res.stdout. Because run_subprocess captures output, devops pr view is silent unless the REST fallback is used; preserve the successful command output here.
    res = run_subprocess(cmd, check=False)
    if res.returncode != 0:
        if _render_pr_view_fallback(number, repo):
            return
        raise typer.Exit(res.returncode)

src/devops_cli/commands/pr.py:306

  • The successful gh pr checks result is also discarded: run_subprocess captures stdout and this function returns without rendering it. Users therefore get no check status on the normal path; print res.stdout after the fallback/error branch.
    res = run_subprocess(cmd, check=False)
    if res.returncode != 0:
        if _render_pr_checks_fallback(number, repo):
            return
        raise typer.Exit(res.returncode)

src/devops_cli/commands/pr.py:721

  • The GraphQL rate-limit branch only tells the user to wait; it never reads the GraphQL reset epoch or displays the countdown described by this feature's acceptance criteria. On exhaustion, users still cannot determine when retrying is safe. Query/reuse the rate-limit data or include an actionable reset time in this failure path.
    if "rate limit" in clean_err.lower():
        print_error(
            f"Failed to mark PR #{number} ready: GitHub GraphQL rate limit exceeded.\n"
            f"Details: {clean_err}\n"
            "Note: GitHub REST API PATCH /pulls does NOT support converting drafts. "
            "Wait for the GraphQL rate limit window to reset or convert via the GitHub web UI."

tests/test_fastmcp_contracts.py:136

  • The new FastMCP contract test only checks that these tool names are registered; it never exercises the argument-to-command mapping, defaults, bounds, or optional flags for the new tools. A regression such as the pr_ready(monitor=True) timeout or an omitted --log-failed flag would still pass. Add invocation and validation tests alongside the existing MCP tool tests.
        "gh_rate_limit",
        "gh_runs_list",
        "gh_run_view",
        "pr_ready",
        "pr_diff",
        "pr_close",
        "pr_edit",
  • Files reviewed: 20/20 changed files
  • Comments generated: 11
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread k8s/squid/deployment.yaml Resolved
Comment thread src/devops_cli/ai/mcp/server.py Resolved
Comment thread src/devops_cli/commands/gh.py Resolved
Comment thread src/devops_cli/commands/pr.py Resolved
Comment thread src/devops_cli/commands/pr.py Resolved
Comment thread src/devops_cli/commands/pr.py Resolved
Comment thread src/devops_cli/ai/mcp/server.py Resolved
Comment thread src/devops_cli/commands/gh.py Resolved
Comment thread src/devops_cli/commands/pr.py Resolved
Comment thread src/devops_cli/config/settings.py Resolved
…s and merge blockers (#188)

- Update .github/workflows/ci.yml pull_request triggers to include ready_for_review
- Add Verify PR Merge Readiness step to CI workflow calling devops pr check-readiness
- Add devops pr check-readiness command and REST fallback for list_prs and list_threads
- Add pr_check_readiness FastMCP tool and harden _run_mcp_cmd with mask_secrets
- Sanitize output and validate formats in gh run view/list and pr view/checks/diff
- Remediate and resolve 11 Copilot review findings across PR #187

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved security, correctness, fallback, documentation, and MCP coverage issues remain.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (22)

docs/CLI_REFERENCE.md:4350

  • This CLI reference repeats a format contract the implementation does not support: rate_limit_cmd rejects yaml and markdown, despite this line advertising them. Keep the generated reference synchronized with the command's actual table/json choices or add those output formats.
| `--format`, `-f` | `string` | `table` | Output format type (table, json, yaml, markdown). |

docs/agent/task.md:28

  • The task index repeats In Progress for task #188 even though its linked PR #187 is ready for review. Update the index together with the task file so the lifecycle summary remains consistent.
| [#188](https://github.com/dan-petty/devops-cli/issues/188) | [#187](https://github.com/dan-petty/devops-cli/pull/187) | Gate pull request workflow on unresolved review threads and merge blockers | `In Progress` | [`task-188-ci-pr-merge-readiness-workflow-gate.md`](tasks/task-188-ci-pr-merge-readiness-workflow-gate.md) |

docs/agent/tasks/task-181-native-gh-cli-pr-governance.md:5

  • This task file says the PR is still Draft and its review/CI checklist is incomplete, so its lifecycle status must remain In Progress rather than In Review. Please update this detail file and the matching row in docs/agent/task.md together when the PR is actually ready for review; the repository's lifecycle guidance distinguishes draft WIP from ready PRs.
**Status**: In Review

docs/commands/gh.md:19

  • This generated entry advertises yaml and markdown, but rate_limit_cmd accepts only table and json and now rejects those advertised values. Update the command documentation/help to list only the supported formats, or implement the missing serializers.
| `--format`, `-f` | `string` | `table` | Output format type (table, json, yaml, markdown). |

src/devops_cli/ai/mcp/server.py:1997

  • This MCP wrapper drops explicitly empty title, body, or base values before invoking the CLI, so even after the CLI distinguishes omitted from empty options, MCP callers still cannot clear a PR body. Use is not None for these optional fields rather than truthiness.
    if title:
        _validate_mcp_arg("title", title)
        cmd.extend(["--title", title])
    if body:
        _validate_mcp_arg("body", body)
        cmd.extend(["--body", body])
    if base:
        _validate_mcp_arg("base", base)
        cmd.extend(["--base", base])

src/devops_cli/ai/mcp/server.py:2023

  • This MCP wrapper drops an explicitly empty title, body, or state value before invoking the CLI, so issue bodies cannot be cleared through the new tool. Use is not None for optional fields rather than truthiness.
    if title:
        _validate_mcp_arg("title", title)
        cmd.extend(["--title", title])
    if body:
        _validate_mcp_arg("body", body)
        cmd.extend(["--body", body])
    if state:
        _validate_mcp_arg("state", state)
        cmd.extend(["--state", state])

src/devops_cli/ai/mcp/server.py:1888

  • pr_check_readiness is a new public MCP tool, but it is absent from expected_core_tools and has no invocation or argument-validation test in tests/test_mcp.py; only registration of neighboring tools is checked. Add focused coverage so command construction, repository forwarding, and the optional PR-number path cannot regress silently.
@mcp.tool()
def pr_check_readiness(
    pr_number: int | None = None,
    require_ready: bool = False,
    repo: str | None = None,
) -> str:
    """Validate PR merge readiness: verify no unresolved review threads, no conflicts, and clean state."""

src/devops_cli/commands/gh.py:1026

  • This newly added error branch exposes raw GitHub CLI stderr through print_error, which does not mask secrets. Bound and pass the diagnostic through mask_secrets before rendering it, as the workflow-log success path already does.
        print_error(f"Failed to query rate limits: {res.stderr.strip()}")

src/devops_cli/commands/gh.py:1111

  • This newly added error branch exposes raw GitHub CLI stderr through print_error, which does not mask secrets. Bound and pass the diagnostic through mask_secrets before rendering it, as the workflow-log success path already does.
        print_error(f"Failed to list workflow runs: {res.stderr.strip()}")

src/devops_cli/commands/gh.py:1164

  • This newly added error branch exposes raw GitHub CLI stderr through print_error, which does not mask secrets. Bound and pass the diagnostic through mask_secrets before rendering it, as the workflow-log success path already does.
        print_error(f"Failed to view workflow run #{run_id}: {res.stderr.strip()}")

src/devops_cli/commands/gh.py:987

  • The no-op check uses truthiness, so --body "" is treated as if no option was supplied and the PATCH cannot clear an existing issue body. Distinguish omitted options from explicitly empty values with is None checks, while still rejecting a call where all three options are omitted.
    if not any([title, body, state]):
        print_warning("No changes specified. Use --title, --body, or --state.")
        return

    owner, repo_name = target_repo.split("/", 1)
    cmd = [CONST_GH_CLI, "api", "--method", "PATCH", f"repos/{owner}/{repo_name}/issues/{number}"]
    if title is not None:
        cmd.extend(["-f", f"title={title}"])
    if body is not None:
        cmd.extend(["-f", f"body={body}"])
    if state is not None:
        cmd.extend(["-f", f"state={state}"])

src/devops_cli/commands/gh.py:1020

  • This command passes the shared format help that advertises table, json, yaml, markdown, but the validation below accepts only table and json; the generated docs in this PR consequently document values that always fail. Use command-specific help listing the supported formats and regenerate the docs, or implement the advertised serializers.
        typer.Option("--format", "-f", help=HELP.options.format_type),

src/devops_cli/commands/gh.py:1086

  • This command passes the shared format help that advertises table, json, yaml, markdown, but the validation above accepts only table and json; the generated docs in this PR consequently document values that always fail. Use command-specific help listing the supported formats and regenerate the docs, or implement the advertised serializers.
        str, typer.Option("--format", "-f", help=HELP.options.format_type)

src/devops_cli/commands/pr.py:1088

  • The same paginated REST fallback is used here, and it has the same multi-page parsing failure: _fetch_rest_unresolved_comments receives concatenated page documents but calls json.loads on the whole stream. Listing threads after a GraphQL rate-limit event can therefore fail for PRs with more than one page of comments; parse paginated output with the shared helper or slurp it first.
            threads = _fetch_rest_unresolved_comments(owner, repo_name, number)

src/devops_cli/commands/pr.py:734

  • The REST create fallback sends only the local branch name as head. When --repo targets an upstream repository and the current checkout is a fork, GitHub requires <fork-owner>:<branch>; after the GraphQL create fails, this fallback looks for the branch in the base repository and cannot create the PR. Derive the local remote owner and prefix it when it differs from the target owner.
        f"head={head}",

src/devops_cli/commands/pr.py:673

  • The no-op check uses truthiness, so --body "" is treated as if no option was supplied and the later if body: also prevents clearing an existing PR body. Optional means omitted versus explicitly empty here; use is None checks so callers can intentionally set an empty body.
    if not any([title, body, base]):

src/devops_cli/commands/pr.py:817

  • The linked requirement calls for GraphQL rate-limit countdown handling, but this failure path only tells the user to wait and never queries or renders the reset epoch. The new rate-limit command does not make pr ready actionable; report the GraphQL reset countdown (or explicitly document that only a manual retry is supported) before exiting.
        print_error(
            f"Failed to mark PR #{number} ready: GitHub GraphQL rate limit exceeded.\n"
            f"Details: {clean_err}\n"
            "Note: GitHub REST API PATCH /pulls does NOT support converting drafts. "
            "Wait for the GraphQL rate limit window to reset or convert via the GitHub web UI.",

src/devops_cli/commands/pr.py:323

  • On a successful gh pr view, this captures the subprocess output but never writes it, so devops pr view exits successfully with an empty terminal; the REST fallback is only used on failure. Emit res.stdout through the sanitized stream writer on the success path.
    res = run_subprocess(cmd, check=False)
    if res.returncode != 0:
        if _render_pr_view_fallback(number, repo):
            return
        raise typer.Exit(res.returncode)

src/devops_cli/commands/pr.py:348

  • The successful gh pr checks response is also discarded here, so callers receive no check results unless the GraphQL command fails and the REST fallback renders them. Write the captured stdout on the success path, using the sanitized stream output.
    res = run_subprocess(cmd, check=False)
    if res.returncode != 0:
        if _render_pr_checks_fallback(number, repo):
            return
        raise typer.Exit(res.returncode)

src/devops_cli/commands/pr.py:237

  • The REST fallback correctly sanitizes the PR body below, but the title, author, branch, and URL are still inserted directly into print_table, whose default is safe=False. A remote PR title such as [red]... can alter Rich rendering and token-like metadata is not masked; render these untrusted fields through the safe/sanitized output path as well.
    print_table(
        title=f"Pull Request #{number}: {title}",
        columns=["Property", "Value"],
        rows=[
            ["Status", f"{state}{draft}"],
            ["Author", author],
            ["Branch", f"{head} -> {base}"],
            ["URL", url],

src/devops_cli/core/process.py:182

  • This changes the credential-isolation boundary by reintroducing ambient GH_TOKEN/GITHUB_TOKEN for gh, but the existing subprocess tests only exercise generic/non-gh commands and never cover this branch. Add regression tests proving tokens reach gh while remaining stripped from every other child process.
    if bin_name == "gh":
        for token_var in ("GH_TOKEN", "GITHUB_TOKEN"):
            if token_var in os.environ and token_var not in sub_env:
                sub_env[token_var] = os.environ[token_var]

tests/test_fastmcp_contracts.py:136

  • pr_check_readiness is a new MCP-facing behavior, but the registration contract only lists the other newly added tools and there is no direct test of this wrapper's argument forwarding, success result, or failure response. Add canonical contract and behavior tests so MCP clients cannot silently receive a broken or unregistered readiness tool.
        "gh_issue_edit",
        "gh_project_list",
        "gh_project_audit",
        "gh_views_audit",
        "gh_rate_limit",
        "gh_runs_list",
        "gh_run_view",
        "pr_ready",
        "pr_diff",
        "pr_close",
        "pr_edit",
  • Files reviewed: 23/23 changed files
  • Comments generated: 13
  • Review effort level: Lite

Comment thread src/devops_cli/ai/mcp/server.py Resolved
Comment thread src/devops_cli/commands/gh.py Resolved
Comment thread src/devops_cli/commands/gh.py Resolved
Comment thread src/devops_cli/commands/gh.py Resolved
Comment thread src/devops_cli/commands/pr.py Resolved
Comment thread src/devops_cli/commands/pr.py Resolved
Comment thread src/devops_cli/commands/pr.py Resolved
Comment thread src/devops_cli/config/settings.py Resolved
Comment thread src/devops_cli/core/process.py Resolved
@dan-petty
dan-petty merged commit 6266a30 into release/v0.2.17 Sep 13, 2026
4 checks passed
@dan-petty
dan-petty deleted the feat/181-native-gh-cli-pr-governance branch September 13, 2026 19:20
dan-petty added a commit that referenced this pull request Sep 14, 2026
* feat(release): v0.2.17

* feat(sandbox): protocol-agnostic endpoint readiness and health probing subsystem (#107)

Closes #107

* docs(agent): reconcile task 107 tracking to done (#107)

* feat(telemetry): cgroup v2 metrics collection and prometheus application scraping (#108)

Closes #108

* docs(agent): reconcile task 108 to done following PR #164 merge

* docs(agent): require draft pull requests for in-progress work (#165) (#166)

* docs(agent): require draft pull requests for in-progress work (#165)

* docs(agent): align lifecycle definitions and update task index for PR #166

* fix(sandbox): resolve cpu delta sampling, ssrf boundaries, and cgroup fallback (#168)

* fix(sandbox): remediate pr 164 review findings on sandbox metrics collection (#167)

* test(sandbox): normalize whitespace in help assertion for variable terminal widths

* test(sandbox): assert help option text without border wrapping sensitivity

* fix(sandbox): address pr 168 review comments on url sanitization and telemetry contracts (#167)

* fix(sandbox): resolve pr 168 review comments on cpu delta sampling, ssrf boundaries, and cgroup fallback (#167)

* test(sandbox): remove redundant comment header in metrics tests

* feat(pr): monitor pr checks, copilot reviews, and review threads (#170) (#171)

* feat(github): automated pr monitoring and copilot review verification (#170)

* fix(pr): resolve copilot review findings and enforce 5m/60s monitoring standards (#170)

* feat(k8s): configurable k8s context setting and conditional minikube autostart (#172) (#174)

* feat(k8s): configurable k8s context setting and conditional minikube autostart (#172)

* docs(k8s): document minikube devcontainer lifecycle and external cluster configurations (#172)

* fix(k8s): resolve copilot review findings for context validation and autostart (#172)

* test(k8s): update qdrant secret lifecycle assertion for effective context flag (#172)

* fix(github): project field options sync, complete pagination, generic owner resolution, and mock hostname standardization (#175) (#173)

- Resolve automated GitHub Projects bot resetting status by auto-provisioning missing single-select options (e.g. 'In Review')
- Implement complete pagination across projectsV2 items, issues, and PR endpoints
- Resolve project owner dynamically via gh api user login without hardcoded usernames
- Display draft PR warnings cleanly in monitor exit handler
- Standardize all mock/dummy test values across all tests to example.com with no subdomain
- Enforce complexity <= 10 and nesting <= 5 architectural invariants

* fix(review): remediate devsecops findings and enhance review self-improvement loop (#176) (#177)

* docs(agent): bootstrap task 176 for review findings remediation

* fix(review): remediate DevSecOps findings and enhance review self-improvement loop (#176)

* feat(telemetry): w3c traceparent propagation and distributed trace correlation (#109) (#178)

* feat(telemetry): w3c traceparent propagation and distributed trace correlation (#109)

* docs(agent): link draft PR 178 in task 109 tracking

* fix(k8s): resolve helm ssa conflicts, loki validation, podsecurity, and qdrant permissions (#183) (#182)

* fix(k8s): resolve helm ssa conflicts, loki validation, podsecurity, and qdrant permissions (#183)

* docs(agent): link pull request #182 in task 183 tracking

* feat(sandbox): streaming diagnostic log aggregator and panic detector (#110) (#179)

* feat(sandbox): streaming diagnostic log aggregator and panic detector (#110)

* docs(agent): link draft PR #179 in task-110 tracking

* fix(sandbox): remediate review findings, demux streams, bound follow memory, and sanitize output (#110)

* docs(agent): update task 110 status to In Review and record review thread resolutions

* fix(github): gate pr merge readiness on required approvals, mergeable state, and reviewer feedback (#183) (#184)

* fix(github): gate pr merge readiness on required approvals, mergeable state, and reviewer feedback (#183)

* fix(github): remediate copilot review findings on pr merge readiness (#183)

* fix(github): enforce review approval gate, exclude negative copilot headings, and forward tokens (#183)

* fix(github): restrict copilot heading match, validate approval head sha, and support explicit env (#183)

* fix(review): remediate DevSecOps findings and enhance review self-improvement loop (#185) (#186)

* fix(github): gate pr merge readiness on required approvals, mergeable state, and reviewer feedback (#183)

* fix(review): remediate session 20260913-060209 findings and enhance review self-improvement loop (#185)

- sandbox probe: block metadata endpoints, bound regex len and search window, validate target URLs
- telemetry waterfall: enforce hex trace ID validation and validate Jaeger endpoints against SSRF
- telemetry context: add trace_flags parameter to generate_traceparent
- sandbox logs: mask secrets in panic incidents and set 0o600 file / 0o700 dir permissions
- sandbox metrics: reject cgroup path traversal and restrict parsing to valid cgroup hierarchies
- sandbox models: truncate and mask probe result details and incident messages/stacktraces
- sanitizer: mask secrets in non-flag arguments in sanitize_command_args_for_display
- valkey client: correctly strip enclosing brackets from IPv6 hostnames
- http client: validate timeout argument types
- k8s stack lifecycle: mask non-localhost emails in bootstrap summary display
- anti-hallucination dataset: calibrate false positives into common_hallucinations.json
- documentation & prompts: update SELF_IMPROVEMENT.md, review.md, AGENTS.md, and task tracking

* docs(agent): link pull request #186 in task 185 tracking

* fix(review): address review feedback across sandbox, telemetry, k8s, and test fixtures (#185)

- probe: canonicalize trailing dot and resolve host to block link-local/cloud metadata
- waterfall: reject resolved metadata hosts and fix exception tuple in Jaeger trace query
- k8s: mask short and malformed emails in bootstrap display and preserve PII in dry-run
- pr monitor: exclude unknown mergeable_state from readiness and evaluate latest review per user
- http client: raise HTTPTimeoutTypeError derived from ValidationError and TypeError
- sandbox logs: unlink archive and raise SandboxError on incident chmod failure
- sandbox metrics: enforce path-aware containment for cgroup v2 hierarchies
- sandbox models: recursively sanitize nested details and reserve suffix length for truncation cap
- telemetry context: raise TraceValidationError on invalid traceparent flags
- conftest: detect and fail on unauthorized creation or deletion of workspace config.yaml
- tasks: reconcile PR #184 mapping, update taxonomy to status/in-review, and re-sync index

* fix(process): preserve GH_TOKEN and GITHUB_REPOSITORY for gh binary execution

* fix(repo): prioritize git remote origin before GITHUB_REPOSITORY fallback

* fix(security): pin vetted ip transports against dns rebinding and enforce clean merge state (#185) (#186)

* feat(github): implement native devops cli functionality for gh operations and pr governance (#181) (#187)

* feat(github): implement native devops cli functionality for gh operations and pr governance (#181)

- Implement native devops pr ready, diff, and close subcommands
- Implement native devops gh rate-limit and runs subcommands
- Register FastMCP tools pr_ready, pr_diff, pr_close, gh_rate_limit, gh_runs_list, gh_run_view
- Harden config discovery and add pytest safety barrier against workspace config mutations
- Configure squid k8s deployment to use internal registry alias registry.local:5000
- Add comprehensive test coverage and documentation updates

* feat(github): add REST fallbacks for pr view/checks, issues/pr edit, and resolve loki crashloop (#181)

- Fall back to REST API in devops pr view and devops pr checks when GraphQL rate limits are exceeded
- Add devops pr edit and devops gh issues edit subcommands
- Register FastMCP tools pr_edit and gh_issue_edit
- Disable loki-sc-rules sidecar in dev cluster k8s/logging/loki-values.yaml to eliminate k8s API watch crashloop
- Add unit tests for pr/issue edit and REST fallbacks

* docs(agent): link PR #187 in task 181 tracking

* ci(workflows): gate pull request workflow on unresolved review threads and merge blockers (#188)

- Update .github/workflows/ci.yml pull_request triggers to include ready_for_review
- Add Verify PR Merge Readiness step to CI workflow calling devops pr check-readiness
- Add devops pr check-readiness command and REST fallback for list_prs and list_threads
- Add pr_check_readiness FastMCP tool and harden _run_mcp_cmd with mask_secrets
- Sanitize output and validate formats in gh run view/list and pr view/checks/diff
- Remediate and resolve 11 Copilot review findings across PR #187

* fix(process): preserve GH_TOKEN and GITHUB_REPOSITORY for gh binary execution

* fix(repo): prioritize git remote origin before GITHUB_REPOSITORY fallback

* fix(github): remediate review findings across pr readiness, sanitization, and rest fallbacks (#181) (#188)

* fix(ci): support allow-blocked-state in pr check-readiness for github actions workflow

* docs(agent): update task 181 checklist with passing ci checks and resolved review feedback

* fix(github): add REST API fallback and rate limit handling for pr review threads (#180) (#189) (#191)

* fix(github): add REST API fallback and rate limit handling for pr review threads (#180) (#189)

* docs(agent): record PR #191 in task 180 tracking

* docs(agent): require concise commit messages stating direct effect of change (#169) (#192)

* fix(k8s): harden logging perimeter and scope fluent bit namespaces (#121) (#193)

* chore(ci): align core dependencies and synchronize lockfile (#115) (#194)

* feat(argo): implement automated gitops drift detection and watch command (#111)

* feat(argo): implement automated gitops drift detection and watch command (#111)

* fix(argo): address PR #195 review feedback on gitops webhook, secret masking, and baseline persistence

* feat(github): declarative branch protection auditor and repository secret synchronization (#197)

* feat(github): declarative branch protection auditor and repository secret synchronization

* docs(agent): link PR #197 in task-114 tracking file

* fix(github): lazily fetch public key during secret sync and isolate tests

* chore(release): cut v0.2.17 and finalize release notes (#198)

* feat(test): add deterministic async memory and connection pool profiler (#199)

Implement deterministic async memory and connection pool profiler under devops test profile-memory (#199)

Closes #199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants