Skip to content

feat(test): add manual Qwen 3.6 production qualification - #636

Open
Graffioh wants to merge 1 commit into
Luce-Org:mainfrom
Graffioh:codex/quality-gates-v1
Open

feat(test): add manual Qwen 3.6 production qualification#636
Graffioh wants to merge 1 commit into
Luce-Org:mainfrom
Graffioh:codex/quality-gates-v1

Conversation

@Graffioh

@Graffioh Graffioh commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an operator-dispatched Qwen 3.6 27B Q4 production qualification for the R9700 and Strix Halo profiles
  • keep hardware-specific code under harness/qualification/qwen36
  • run fast model-free tests in hosted CI for profiles, commands, lifecycle handling, evidence, reports, and performance-sample conversion
  • retain complete JSON and Markdown evidence from the manual workflow

Scope

The runner checks the model artifact and hardware identity, builds and starts one long-lived server, then runs correctness, bounded quality, determinism, concurrency, performance capture, and resource-drift stages.

R5 records repeated c1 and c4 performance samples. It does not apply a baseline pass or fail threshold yet. R7 cross-checks the candidate samples against the retained raw reports and validates /props against the selected model profile.

This PR does not add the dashboard, performance-history system, checked-in baselines, or an automatic model-backed GPU job. PR #687 owns kernel-level correctness and route-witness coverage.

Verification

  • 82 model-free tests passed, plus 4 subtests
  • focused Ruff checks passed
  • both workflow files and the profile manifest parse as YAML
  • the launcher passes Bash syntax validation
  • the runner lists both production profiles

Two process-group signal tests cannot run on the current macOS host because the sandbox blocks the required signals. They remain in the hosted Linux CI suite.

Left before production sign-off

  • run R0 through R7 for both profiles when the remote AMD machine is available
  • inspect and retain the first hardware evidence bundles
  • calibrate reviewed baselines and performance thresholds in a follow-up change

The PR remains a draft until the model-backed runs complete.

@Graffioh Graffioh changed the title feat: add benchmark and quality/performance gates feat: establish benchmark and quality-gate foundations Aug 20, 2026
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from 264b8b9 to 243397a Compare August 20, 2026 15:54
@Graffioh Graffioh changed the title feat: establish benchmark and quality-gate foundations bench: add Qwen AR qualification and feature gates Aug 20, 2026
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from 243397a to 79ac7ab Compare August 20, 2026 17:25
@Graffioh Graffioh changed the title bench: add Qwen AR qualification and feature gates bench: add Qwen AR production quality gates Aug 20, 2026
@Graffioh
Graffioh marked this pull request as ready for review August 21, 2026 06:10

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 43 files

Tip: cubic used a learning from your PR history. Let your coding agent read cubic learnings directly with the cubic MCP.

Re-trigger cubic

Comment thread bench/profiles.py Outdated
Comment thread bench/profiles.py Outdated
Comment thread server/scripts/quality_humaneval_plus.py Outdated
Comment thread harness/qualification/qwen36/qwen36_amd.py Outdated
Comment thread bench/release/qualify.py Outdated
Comment thread bench/performance/compare.py Outdated
Comment thread bench/tests/test_production_gates.py Outdated
Comment thread bench/performance/from_generation.py Outdated
Comment thread bench/correctness/losslessness.py Outdated
Comment thread server/DEVELOPER.md Outdated
@Graffioh
Graffioh marked this pull request as draft August 21, 2026 07:20
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from 79ac7ab to 869f1c9 Compare August 21, 2026 07:57
@Graffioh
Graffioh marked this pull request as ready for review August 21, 2026 07:58

@cubic-dev-ai cubic-dev-ai Bot 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.

1 existing issue remains and no new issues found across 32 files

Requires human review: Auto-approval blocked because this review re-detected 6 unresolved issues already reported by Cubic.

Re-trigger cubic

Comment thread bench/baselines/schema.json Outdated
Comment thread bench/performance/compare.py Outdated
Comment thread bench/baselines/qwen38-27b-q4-strix-halo-ar-c4.json Outdated
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch 3 times, most recently from a9970d3 to 419e72e Compare August 21, 2026 12:13
@Graffioh Graffioh changed the title bench: add Qwen AR production quality gates bench: qualify Qwen 27B AR on R9700 and Strix Aug 21, 2026
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from 419e72e to 96f5c87 Compare August 21, 2026 12:52
@Graffioh Graffioh changed the title bench: qualify Qwen 27B AR on R9700 and Strix bench: qualify Qwen 3.6 27B AR on R9700 and Strix Aug 21, 2026
@Graffioh

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@Graffioh I have started the AI code review. It will take a few minutes to complete.

@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from 96f5c87 to 9f67122 Compare August 21, 2026 13:28

@cubic-dev-ai cubic-dev-ai Bot 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.

Review completed against the latest diff

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread harness/qualification/qwen36/qualify.py
Comment thread harness/benchmarks/generation_benchmark.py Outdated
Comment thread bench/profiles.py Outdated
Comment thread bench/profiles.py Outdated
Comment thread bench/profiles.py Outdated
Comment thread bench/release/qwen36_amd.py Outdated
Comment thread bench/baselines/qwen36-27b-q4-strix-halo-ar-c4.json Outdated
Comment thread bench/tests/test_quality_gates.py Outdated
Comment thread bench/baselines/qwen36-27b-q4-r9700-ar-c4.json Outdated
Comment thread bench/baselines/qwen36-27b-q4-strix-halo-ar-c4.json Outdated
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from 9f67122 to 9794f0e Compare August 21, 2026 13:54
@Graffioh Graffioh changed the title bench: qualify Qwen 3.6 27B AR on R9700 and Strix bench: add quality gate for Qwen 3.6 27B AR on R9700 and Strix Aug 21, 2026
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from 9794f0e to 925e204 Compare August 21, 2026 15:16

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 4 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread bench/release/dashboard.py Outdated

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 18 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread bench/performance/history.py Outdated
Comment thread harness/qualification/qwen36/profiles.py
Comment thread bench/tests/test_performance_history_contracts.py Outdated
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch 2 times, most recently from ad1e25f to e67ea59 Compare August 24, 2026 12:47
@davide221

Copy link
Copy Markdown
Contributor

@howard0su

@Graffioh Graffioh changed the title bench: add quality gate for Qwen 3.6 27B AR on R9700 and Strix feat(bench): add quality gate for Qwen 3.6 27B AR on R9700 and Strix Aug 26, 2026
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from e67ea59 to d9fdcd8 Compare September 1, 2026 12:55
@Graffioh Graffioh changed the title feat(bench): add quality gate for Qwen 3.6 27B AR on R9700 and Strix feat(test): add manual Qwen 3.6 production qualification Sep 1, 2026
@Graffioh
Graffioh marked this pull request as draft September 1, 2026 12:56

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 21 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread harness/qualification/qwen36/profiles.py
Comment thread harness/qualification/qwen36/environment.py Outdated
Comment thread harness/qualification/qwen36/qualify.py Outdated
Comment thread harness/qualification/qwen36/qwen36_amd.py Outdated
Comment thread harness/qualification/qwen36/qwen36_amd.py
Comment thread harness/qualification/qwen36/performance.py
Comment thread harness/qualification/qwen36/qwen36_amd.py
Comment thread harness/benchmarks/prompts/generation_smoke.jsonl
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/production-quality.yml Outdated
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from d9fdcd8 to 7e8baac Compare September 2, 2026 20:05
@Graffioh
Graffioh marked this pull request as ready for review September 2, 2026 20:16
@Graffioh

Graffioh commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@Graffioh I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 21 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread harness/qualification/qwen36/qualify.py
Comment thread harness/qualification/qwen36/qwen36_amd.py Outdated
Comment thread harness/qualification/qwen36/profiles.py Outdated
Comment thread harness/qualification/qwen36/profiles.py Outdated
Comment thread harness/qualification/qwen36/profiles.py
Comment thread harness/qualification/qwen36/performance.py Outdated
Comment thread harness/qualification/qwen36/qualify.py
Comment thread harness/qualification/qwen36/qualify.py
Comment thread harness/tests/test_qwen36_production_gates.py
Comment thread harness/qualification/qwen36/environment.py Outdated

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 21 files

Requires human review: Auto-approval blocked by 11 unresolved issues from a previous review of this commit.

Re-trigger cubic

Comment thread harness/qualification/qwen36/environment.py Outdated
Comment thread harness/qualification/qwen36/profiles.py
Comment thread .github/workflows/production-quality.yml
Comment thread harness/qualification/qwen36/qwen36_amd.py
Comment thread harness/qualification/qwen36/profiles.py
Comment thread harness/benchmarks/generation_benchmark.py Outdated
Comment thread harness/tests/test_qwen36_production_gates.py
Comment thread harness/qualification/qwen36/profiles.py Outdated
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from 7e8baac to 7a61ea0 Compare September 3, 2026 09:19
@Graffioh

Graffioh commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@Graffioh I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 21 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread harness/qualification/qwen36/environment.py Outdated
Comment thread harness/qualification/qwen36/qualify.py Outdated
Comment thread harness/qualification/qwen36/environment.py Outdated
Comment thread harness/qualification/qwen36/performance.py Outdated
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from 7a61ea0 to e2af84d Compare September 3, 2026 10:13
@Graffioh

Graffioh commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@Graffioh I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 21 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Re-trigger cubic

Comment thread harness/qualification/qwen36/qwen36_amd.py Outdated
Comment thread harness/qualification/qwen36/qualify.py Outdated
Comment thread harness/qualification/qwen36/qualify.py Outdated
@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from e2af84d to af2cfc6 Compare September 3, 2026 10:45
@Graffioh

Graffioh commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@Graffioh I have started the AI code review. It will take a few minutes to complete.

@Graffioh

Graffioh commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 21 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Re-trigger cubic

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@Graffioh I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 21 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Re-trigger cubic

@Graffioh
Graffioh force-pushed the codex/quality-gates-v1 branch from af2cfc6 to b79419d Compare September 3, 2026 11:07
@Graffioh

Graffioh commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@Graffioh I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

4 issues found across 21 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="harness/qualification/qwen36/qualify.py">

<violation number="1" location="harness/qualification/qwen36/qualify.py:102">
P2: When a stale PID file points to a reused PID, cleanup can kill an unrelated process or process group. Store and verify the launched process identity before sending signals.</violation>

<violation number="2" location="harness/qualification/qwen36/qualify.py:173">
P3: With a monitor interval below six seconds, a slow telemetry sample can outlive the 10-second join timeout and turn cleanup into a qualification failure. Use a join timeout longer than the sample's bounded 11-second execution time.</violation>

<violation number="3" location="harness/qualification/qwen36/qualify.py:323">
P1: When a retained generation report omits prompt cases, this validator accepts the subset because it trusts the report’s own case count. Require the submitted case IDs and count to match the canonical corpus before allowing generation evidence to pass.</violation>

<violation number="4" location="harness/qualification/qwen36/qualify.py:348">
P2: When `gold_accuracy` is `NaN` or negative infinity, the threshold comparison evaluates as passing. Reject non-finite and boolean accuracy values before applying the quality threshold.</violation>
</file>

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Re-trigger cubic

if not isinstance(summary, dict) or summary.get("status") != "pass":
raise ValueError(f"{path.name}: generation verdict did not pass")
cases = report.get("cases")
if not isinstance(cases, list) or not cases:

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.

P1: When a retained generation report omits prompt cases, this validator accepts the subset because it trusts the report’s own case count. Require the submitted case IDs and count to match the canonical corpus before allowing generation evidence to pass.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At harness/qualification/qwen36/qualify.py, line 323:

<comment>When a retained generation report omits prompt cases, this validator accepts the subset because it trusts the report’s own case count. Require the submitted case IDs and count to match the canonical corpus before allowing generation evidence to pass.</comment>

<file context>
@@ -0,0 +1,907 @@
+    if not isinstance(summary, dict) or summary.get("status") != "pass":
+        raise ValueError(f"{path.name}: generation verdict did not pass")
+    cases = report.get("cases")
+    if not isinstance(cases, list) or not cases:
+        raise ValueError(f"{path.name}: generation cases are missing")
+    if summary.get("cases") != len(cases):
</file context>

if pid_file is None or not pid_file.is_file():
return {}
try:
pid = int(pid_file.read_text().strip())

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.

P2: When a stale PID file points to a reused PID, cleanup can kill an unrelated process or process group. Store and verify the launched process identity before sending signals.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At harness/qualification/qwen36/qualify.py, line 102:

<comment>When a stale PID file points to a reused PID, cleanup can kill an unrelated process or process group. Store and verify the launched process identity before sending signals.</comment>

<file context>
@@ -0,0 +1,907 @@
+    if pid_file is None or not pid_file.is_file():
+        return {}
+    try:
+        pid = int(pid_file.read_text().strip())
+        values: dict[str, Any] = {"pid": pid}
+        for line in Path(f"/proc/{pid}/status").read_text().splitlines():
</file context>

if summary.get("min_gold_accuracy") != minimum_gold_accuracy:
raise ValueError(f"{path.name}: quality threshold differs from the profile")
accuracy = summary.get("gold_accuracy")
if not isinstance(accuracy, int | float) or accuracy < minimum_gold_accuracy:

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.

P2: When gold_accuracy is NaN or negative infinity, the threshold comparison evaluates as passing. Reject non-finite and boolean accuracy values before applying the quality threshold.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At harness/qualification/qwen36/qualify.py, line 348:

<comment>When `gold_accuracy` is `NaN` or negative infinity, the threshold comparison evaluates as passing. Reject non-finite and boolean accuracy values before applying the quality threshold.</comment>

<file context>
@@ -0,0 +1,907 @@
+        if summary.get("min_gold_accuracy") != minimum_gold_accuracy:
+            raise ValueError(f"{path.name}: quality threshold differs from the profile")
+        accuracy = summary.get("gold_accuracy")
+        if not isinstance(accuracy, int | float) or accuracy < minimum_gold_accuracy:
+            raise ValueError(f"{path.name}: quality score did not pass")
+        if summary.get("gold_scored") != len(cases):
</file context>


def stop(self) -> None:
self.stop_event.set()
self.thread.join(timeout=max(10.0, self.interval + 5.0))

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.

P3: With a monitor interval below six seconds, a slow telemetry sample can outlive the 10-second join timeout and turn cleanup into a qualification failure. Use a join timeout longer than the sample's bounded 11-second execution time.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At harness/qualification/qwen36/qualify.py, line 173:

<comment>With a monitor interval below six seconds, a slow telemetry sample can outlive the 10-second join timeout and turn cleanup into a qualification failure. Use a join timeout longer than the sample's bounded 11-second execution time.</comment>

<file context>
@@ -0,0 +1,907 @@
+
+    def stop(self) -> None:
+        self.stop_event.set()
+        self.thread.join(timeout=max(10.0, self.interval + 5.0))
+
+        if self.thread.is_alive():
</file context>
Suggested change
self.thread.join(timeout=max(10.0, self.interval + 5.0))
self.thread.join(timeout=max(15.0, self.interval + 5.0))

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants