Skip to content

feat: add report-only community contribution insights - #1524

Open
Wassim Chegham (manekinekko) wants to merge 3 commits into
mainfrom
manekinekko-contribution-insights
Open

Wassim Chegham (manekinekko) wants to merge 3 commits into
mainfrom
manekinekko-contribution-insights

Conversation

@manekinekko

@manekinekko Wassim Chegham (manekinekko) commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add report-only community PR triage for value/scope fit, overlap, readiness, behavioral evidence, Scope-specific completeness, and reviewer routing. Collection uses bounded GitHub GET requests without checking out or executing contributor code.
  • Copilot supplies all insights and constructive feedback; Microsoft-Decision-1 alone selects the final review action. Disabled configuration produces insights only. Decision failures preserve insights and fail the run; there is no Copilot/provider fallback or automated merge decision.
  • Support native local trials and hosted GitHub Agentic Workflows, with isolated credentials, validated snapshot-bound reports, a short opening summary, compact TL;DR table, and expandable evidence.
  • Add separate production-backed insight/decision evaluations: eight cases per contribution family, 238 approved cases across 17 quality targets overall.

The workflow remains read-only and artifact-only. No comments, labels, reviewer requests, approvals, branch writes, closures, or merges are enabled. Hosted schedules remain opt-in, and this PR provisions no Azure resources.

Demos

N/A: repository automation and developer tooling; no Portal or distributed Scope CLI UX changed. Live reports, Azure settings, and credentials remain local and are not committed.

Before

N/A.

After

N/A.

Testing

Command Result
pnpm exec vitest run scripts/contribution-insights/collect.test.ts scripts/contribution-insights/decision.test.ts scripts/contribution-insights/report.test.ts scripts/contribution-insights/workflow.test.ts scripts/ci-workflow.test.ts --reporter=dot Passed: 127 tests across five files.
pnpm --filter static-prompt-evals typecheck Passed.
pnpm --filter static-prompt-evals test:ts Passed: 76 tests across ten files.
pnpm --filter static-prompt-evals validate-data Passed: 238 approved cases and 17 quality targets.
pnpm --filter static-prompt-evals exec uv run pytest tests/quality --basetemp=results/pr-1524-verification/pytest -o addopts='' --tb=short -q Passed: 86 tests, using the cached-environment settings below.
gh aw compile contribution-insights --no-check-update --actionlint --approve Passed with gh-aw v0.89.21; only the intentional fixed daily schedule advisory remains. Credential review is recorded below.
gh aw lint .github/workflows/contribution-insights.lock.yml Passed.
pnpm headers:check Passed: all 976 in-scope source files, including staged additions.

Cached Python/offline evaluation environment, set from the repository root:

export UV_NO_EDITABLE=1 UV_OFFLINE=1 PYTHONPATH="$PWD/evaluations/static-prompts/src"

Explicit prompt-evaluation commands also passed:

pnpm --filter static-prompt-evals evaluate:quality -- --smoke --offline --samples 1 --dataset datasets/v1/contribution-insights.jsonl --results-dir results/compact-contribution-report-final
pnpm --filter static-prompt-evals evaluate:quality -- --smoke --offline --samples 1 --dataset datasets/v1/contribution-decision.jsonl --results-dir results/decision-integration-verification/decisions

Both passed as plumbing/contract smoke runs, not model-quality baselines. The fake decision transport always abstains and never reads expected labels to choose its answer.

Live manual verification: a fresh native run on public PR #1492 collected current evidence, generated new Copilot insights (gpt-6-luna), and obtained a real Microsoft-Decision-1 result. Separate live decision-only calls verified both Entra ID and API-key authentication. The concise report was then re-rendered without changing its recorded JSON, evidence snapshot, or final decision. No Actions workflow was dispatched or contributor feedback posted.

Hosted Actions execution, its sandbox/firewall and threat-detection path, paid Azure-assisted quality grading, and production calibration were not run.

Documentation and compatibility

No Scope REST API, distributed CLI, or database compatibility changes. Report schema v2 replaces the earlier Copilot-authored recommendation with insights plus trusted Decision-1 metadata; rerun historical v1 JSON through the new pipeline rather than treating it as a Decision-1 result. Existing historical Markdown remains unchanged.

Local --decision requires an existing deployment and explicit configuration before Copilot inference. Azure inference is billed separately from Copilot budgets. Hosted configuration uses an Actions API-key secret; injected Entra tokens are supported locally, but no hosted OIDC provisioning is added. Existing human approval, CLA, and merge requirements remain unchanged.

The Copilot SDK dependency is developer-only and already used elsewhere in the workspace. The lockfile is updated; production license payloads are unchanged, so no NOTICE regeneration is required.

Agentic Workflow credential review

This update adds the CONTRIBUTION_DECISION_API_KEY secret reference; none are removed. Relative to the existing draft, no action dependencies/pins are added or removed and no redirect policy changes.

Reviewed: the key is supplied only to the trusted report-rendering step, outside the Copilot job. It is used in an authentication header, never in prompts or decision input. The client validates an HTTPS Azure resource root, rejects redirects, bounds input/response bytes and request time, and retries only explicit HTTP 429 rejections. GitHub permissions remain read-only/empty, and shared compiler metadata retains older workflow pins and the lockfile merge policy.

Maintainers must still verify the configured Azure resource's ownership, authorization, billing, and hosted secret configuration before rollout. No real key, tenant/subscription ID, private endpoint, or live report is committed.

Checklist

  • If Portal features changed, keep CLI capabilities in sync. N/A: no Portal feature changes.
  • If Portal components changed, update their Storybook stories. N/A: no Portal component changes.
  • If database changes require a migration, include up() / down() and keep it CosmosDB-compatible. N/A: no database changes.
  • If dependencies changed, update the lockfile and regenerate NOTICE / NOTICE-REVIEW.txt with pnpm notice as needed. Lockfile updated; the SDK addition is developer-only and introduces no new production notice content.
  • Video showing the behavior before the suggested change. N/A: repository automation/developer tooling, not a Portal or Scope CLI UX change.
  • Video showing the behavior after the suggested change. N/A: repository automation/developer tooling, not a Portal or Scope CLI UX change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 00c70221-6615-45d2-b39d-3ae77292b59c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 00c70221-6615-45d2-b39d-3ae77292b59c
@github-actions github-actions Bot added type: documentation Documentation additions, corrections, and improvements. area: cicd Build, test, release, and deployment pipelines. type: dependencies Dependency additions, removals, and version updates. language: javascript Work involving JavaScript code, tooling, or dependencies. topic: testing Test coverage, test infrastructure, and validation quality. labels Oct 20, 2026
@manekinekko Wassim Chegham (manekinekko) added topic: dx Dev setup and developer experience type: automation Changes that automate recurring tasks or workflows. labels Oct 20, 2026
@github-actions

Copy link
Copy Markdown

Test Results (Node.js 22)

test: Run #306

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
3285 3285 0 0 0 0 0 1m32s

🎉 All tests passed!

Github Test Reporter

Make Microsoft-Decision-1 the sole final review-action selector while Copilot supplies all insights and contributor feedback. Add isolated Azure configuration, production-backed decision evaluations, and concise report summaries with expandable evidence.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 00c70221-6615-45d2-b39d-3ae77292b59c
@github-actions

Copy link
Copy Markdown

Test Results (Node.js 22)

test: Run #378

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
3330 3330 0 0 0 0 0 58.2s

🎉 All tests passed!

Github Test Reporter

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved workflow trust-boundary gaps, CI trigger omissions, and grading-context mismatch block approval.

4 open issues
1 file not reviewed
  • pnpm-lock.yaml: Generated file
What changed in this PR

Adds report-only community contribution triage to Scope’s repository tooling, separating Copilot-generated insights from optional Microsoft-Decision-1 review-action selection.

Changes:

  • Adds hosted and local assessment flows with snapshot validation, isolated credentials, and artifact-only reports.
  • Integrates separate insight and decision families into the static-prompt evaluation framework.
  • Documents configuration, trust boundaries, and operating limits without changing Scope’s public API or distributed CLI.
File Description
scripts/​license-headers.ts Includes .mts files in license checks.
scripts/​contribution-insights/​workflow.test.ts Tests workflow boundaries and report execution.
scripts/​contribution-insights/​report.test.ts Tests validation, citations, and report layout.
scripts/​contribution-insights/​report.mts Validates assessments and renders reports.
scripts/​contribution-insights/​decision.test.ts Tests decision configuration and transport contracts.
scripts/​contribution-insights/​decision.mts Implements the dedicated Decision-1 client.
scripts/​contribution-insights/​collect.test.ts Tests bounded collection and evidence handling.
pnpm-lock.yaml Records the developer-only SDK dependency.
package.json Exposes the local assessment command.
evaluations/​static-prompts/​tests/​quality/​test_runner.py Tests decision-only evaluation execution.
evaluations/​static-prompts/​tests/​quality/​test_deterministic.py Tests exact decision labels and schema checks.
evaluations/​static-prompts/​tests/​quality/​test_data.py Tests report and decision normalization.
evaluations/​static-prompts/​tests/​quality/​test_configuration.py Tests the new evaluator configurations.
evaluations/​static-prompts/​src/​static_prompt_evals/​quality/​runner.py Skips unnecessary Azure graders.
evaluations/​static-prompts/​src/​static_prompt_evals/​quality/​models.py Retains native decision requests.
evaluations/​static-prompts/​src/​static_prompt_evals/​quality/​deterministic.py Adds decision accuracy and exact-value checks.
evaluations/​static-prompts/​src/​static_prompt_evals/​quality/​data.py Normalizes contribution evaluation output.
evaluations/​static-prompts/​src/​static_prompt_evals/​quality/​configuration.py Allows deterministic-only evaluation families.
evaluations/​static-prompts/​scripts/​validate-dataset.ts Validates contribution cases and action coverage.
evaluations/​static-prompts/​scripts/​validate-coverage.test.ts Updates expected quality-target coverage.
evaluations/​static-prompts/​scripts/​local-copilot.ts Provides an isolated local Copilot session.
evaluations/​static-prompts/​scripts/​local-copilot.test.ts Tests isolation, tool restrictions, and cleanup.
evaluations/​static-prompts/​scripts/​harvest.ts Adds reproducible contribution case curation.
evaluations/​static-prompts/​scripts/​harvest.test.ts Checks committed fixture reproducibility.
evaluations/​static-prompts/​scripts/​dataset-adapter-contract.test.ts Exercises contribution adapter contracts.
evaluations/​static-prompts/​scripts/​contribution-insights-local.ts Runs local collection, inference, and reporting.
evaluations/​static-prompts/​scripts/​contribution-insights-local.test.ts Tests local options and GitHub reads.
evaluations/​static-prompts/​scripts/​contribution-insights-fixtures.ts Defines eight contribution scenarios.
evaluations/​static-prompts/​scripts/​contribution-decision-fixtures.ts Supplies fixed insights for decision evaluation.
evaluations/​static-prompts/​README.md Documents local operation and evaluation families.
evaluations/​static-prompts/​package.json Adds the local runner and SDK dependency.
evaluations/​static-prompts/​evaluators/​rubrics.yaml Defines insight grading and decision accuracy.
evaluations/​static-prompts/​evaluation-manifest.yaml Registers both contribution families.
evaluations/​static-prompts/​datasets/​v1/​contribution-insights.jsonl Adds curated insight evaluation cases.
evaluations/​static-prompts/​datasets/​manifest.json Registers contribution datasets and hashes.
evaluations/​static-prompts/​adapter/​validation.ts Adds explicit transport-error classification.
evaluations/​static-prompts/​adapter/​transport.ts Adds real and fixed-fake decision transports.
evaluations/​static-prompts/​adapter/​targets/​contribution-insights.ts Reuses production insight composition and validation.
evaluations/​static-prompts/​adapter/​targets/​contribution-decision.ts Builds native decision evaluation requests.
evaluations/​static-prompts/​adapter/​runner.ts Classifies dedicated transport failures.
evaluations/​static-prompts/​adapter/​registry.ts Registers the contribution adapters.
evaluations/​static-prompts/​adapter/​protocol.ts Adds contribution families and decision types.
evaluations/​static-prompts/​adapter/​contribution-insights.test.ts Tests insight composition and submission contracts.
evaluations/​static-prompts/​adapter/​contribution-decision.test.ts Tests decision separation and production transport.
evaluations/​static-prompts/​adapter/​adapter.test.ts Updates adapter registry expectations.
ENV_VARIABLES.md Documents pilot and decision settings.
docs/​architecture/​prompt-evaluations.md Documents contribution prompt contracts and evaluation.
CONTRIBUTING.md Explains the report-only pilot and compiler version.
AGENTS.md Links the contribution-insights architecture guide.
.github/​workflows/​contribution-insights.md Defines hosted orchestration and assessment instructions.
.github/​workflows/​ci.yml Adds downstream contribution workflow filters.
.github/​aw/​actions-lock.json Pins the new workflow compiler setup action.

Review effort: Balanced

required: false
default: "3"

if: github.repository == 'microsoft/scope' && github.ref == 'refs/heads/main' && (github.event_name == 'workflow_dispatch' || vars.CONTRIBUTION_INSIGHTS_ENABLED == 'true')
contribution-report:
description: "Save one report-only contribution assessment as validated JSON and Markdown workflow artifacts. Does not post feedback or mutate GitHub entities."
max: 1
if: needs.agent.result == 'success' && needs.detection.result == 'success'
Comment thread .github/workflows/ci.yml
Comment on lines +848 to +849
- '.github/workflows/contribution-insights.md'
- '.github/workflows/contribution-insights.lock.yml'
query = stable_text(query_messages) if query_messages else stable_text(case_input)
if family == "developer-feedback" and query_messages:
context = stable_text(query_messages)
if family == "contribution-decision":

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cicd Build, test, release, and deployment pipelines. language: javascript Work involving JavaScript code, tooling, or dependencies. topic: dx Dev setup and developer experience topic: testing Test coverage, test infrastructure, and validation quality. type: automation Changes that automate recurring tasks or workflows. type: dependencies Dependency additions, removals, and version updates. type: documentation Documentation additions, corrections, and improvements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants