Skip to content

PROF-16810 Verify signed certification for mainline releases - #1059

Open
jbachorik wants to merge 9 commits into
mainfrom
drydock/jb-patient-misty-giraffe
Open

jbachorik wants to merge 9 commits into
mainfrom
drydock/jb-patient-misty-giraffe

Conversation

@jbachorik

@jbachorik jbachorik commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?:
Certify mainline releases without storing a GitLab credential in GitHub. A main-push GitLab job validates the prepared SHA and applies the quarantine list from that commit to existing integration results. GitHub waits for the candidate’s status from a verified Datadog bridge publisher. When the full nightly suite passes, GitHub attests the commit SHA and writes a discovery note.

The train and direct major/minor releases both verify the attestation against the repository, certification workflow, main ref and resolved source SHA. Patch and retag releases use a separate maintenance environment.

Motivation:
A note can locate a candidate but cannot prove who certified it. Checking only in the Friday train would also leave direct dispatch outside the check. On the producer side, the quarantine list must not be replaceable through a CI variable or a mutable working-tree file.

Additional Notes:

  • Human review mandatory: this changes release authorization and credential scope. PSEC-1912 requests a dedicated GitLab publisher. This PR still uses the bridge; it does not implement the GitLab OIDC publisher cutover.
  • Before enabling release writes, provision release-mainline and release-maintenance, restrict deployment refs, require independent maintenance approval, provision the environment-scoped push key and revoke the previous key’s push authority. Naming an environment does not configure these protections. Existing notes without matching attestations cannot authorize a release.
  • Standard Sphinx review of 0e92936eb: no Critical or High findings. The offline gate test detects calls to the stubbed reporting clients, not every possible network operation. The train supplies GH_TOKEN at job scope. Remaining Low items concern candidate wording, a YAML-format-sensitive test, polling cost and diagnostics, context casing and failure if the policy blob is unavailable. The latter fails closed; publisher identity is rechecked each poll.

How to test the change?:

  • passed locally on 0e92936eb: python3 -m unittest discover -s .github/scripts/tests -p 'test_certification_*.py' (68 tests); release train and release automation shell suites; certification, quarantine and integration summary shell suites.
  • passed locally: targeted Bash syntax and ShellCheck, workflow expression lint, :ddprof-lib:qualityChecks.
  • Unverified live: main-push execution and status delivery, failed/cancelled GitLab dependencies, GitHub attestation issuance and verification, and maintenance approval with real environment-scoped credentials. No release was dispatched to test this change.

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a security review (run the dd:platform-security-review
    skill, or file a request via the PSEC review form).
    bewaire also runs automatically on every PR.
  • This PR doesn't touch any of that.
  • JIRA: PROF-16810

Unsure? Have a question? Request a review!

@jbachorik jbachorik added AI human_review:mandatory Human review required — see PR description labels Nov 25, 2026
@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

Comment thread .github/scripts/wait_for_integration.py Resolved
@jbachorik jbachorik added the dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates label Nov 25, 2026
@jbachorik

jbachorik commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator Author

🐶 babysit-pr stopped watching this PR — handed the CI-file finding to the author; no edits or pushes.

This run
  • 11:30 · started · head b4056865e9bf8e2babbc91bd6f08e8db011d71cd; CI pending/red, Bits pending; initial review request already posted by author

  • 11:31 · CI red · Bits review gate / publish is the missing codeowner approval gate, not a flaky job; no retry

  • 11:31 · Bits · initial review pending on b4056865e9bf8e2babbc91bd6f08e8db011d71cd; no duplicate trigger

  • 11:44 · Bits · FAIL on b4056865e9bf8e2babbc91bd6f08e8db011d71cd: trusted P1 thread 4694279517 rejects the verified unnumbered Datadog bridge publisher

  • 11:44 · asked · author will fix the CI-file P1 with regression coverage and fresh review, then reply; thread left unreplied per author direction

  • 11:44 · stopped · author requested handoff; 0 commits pushed, 0 replies, 0 retries, 14.5 minutes elapsed


Stop summary: No commits pushed. CI remains pending/red; codeowner-review/head requires human approval. Bits returned FAIL for the current head. Trusted P1 thread 4694279517 is left open and unreplied for the author's tested fix. Untrusted github-code-quality[bot] thread 4694219365 (empty except) was not acted on. Formal platform-security request and Jira decision update remain pending human work.

  • bits_triggered: [b4056865e9bf8e2babbc91bd6f08e8db011d71cd] (pre-existing request; no duplicate posted)
  • bits_rerequested: []
  • replied: []

✅ stopped 11:44 UTC · blocked on CI-file P1 and required human approval; CI still running

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: FAIL

The publisher pattern rejects an existing bridge bot, causing legitimate pending evidence to fail certification immediately. The suggested replacement accepts that account while preserving publisher ownership verification.

Open Bits AI session

🤖 Bits Code Review · Commit b405686

Comment thread .github/scripts/wait_for_integration.py Resolved
@jbachorik jbachorik removed the dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates label Nov 25, 2026
@dd-octo-sts

dd-octo-sts Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #46024092583 | Commit: 2d46424 | Duration: 22m 47s (longest job)

✅ All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - ✅ - -
8-ibm - ✅ - -
8-j9 ✅ ✅ - -
8-librca - - ✅ ✅
8-orcl - ✅ - -
11 - ✅ - -
11-j9 ✅ ✅ - -
11-librca - - ✅ ✅
17 ✅ ✅ - -
17-graal ✅ ✅ - -
17-j9 ✅ ✅ - -
17-librca - - ✅ ✅
21 ✅ ✅ - -
21-graal ✅ ✅ - -
21-librca - - ✅ ✅
25 ✅ ✅ - -
25-graal ✅ ✅ - -
25-librca - - ✅ ✅

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-11-27 15:47:14 UTC

@jbachorik
jbachorik force-pushed the drydock/jb-patient-misty-giraffe branch from b405686 to de4d790 Compare November 25, 2026 12:58
@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@jbachorik jbachorik added the dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates label Nov 25, 2026
@jbachorik

jbachorik commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator Author

🐶 babysit-pr stopped — observe/escalate only; no source edits, pushes, reruns, thread replies or review triggers.

This run
  • 13:10 · started · head de4d79017bae8906ac36909bb7e2aa8f5c099fa2; test matrix and GitLab CI running; Bits pending; codeowner approval missing

  • 13:10 · Bits · current-head review already requested in comment 7163225979; P1 root 4694279517 already answered by author in 4695269865; no duplicate actions

  • 14:04 · stopped · runner 15430 exited without a result; both worktrees clean; no source edits or pushes

  • 14:04 · asked · current-head Bits P1 4695367652 needs a design decision; GitLab integration verdict failed; codeowner approval required

  • 16:28 · pushed · author delivered a3983b50d: main-only executed-integration gate; 62 local tests passed; fresh Bits requested in comment 7167925795

⚠️ stopped 14:04 UTC · runner failed; author delivered a3983b5; monitoring inactive

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: FAIL

Certification can accept successful no-op statuses from another branch for the candidate SHA, bypassing failed or unfinished main integration tests. Publisher verification does not establish that integration actually executed.

Open Bits AI session

🤖 Bits Code Review · Commit de4d790

Comment thread .github/scripts/wait_for_integration.py Resolved
@dd-octo-sts

dd-octo-sts Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Memory overhead check: ✅ within budget

Profiler 0e92936eb, pipeline. Budget: utils/memcheck/budget.txt. NMT and /proc values are profiled minus no-profiler runs on the same runner.

scenario metric value Δ since budget set limit headroom
allocs native_mem_live_bytes 21.70 MiB +13 KiB 21.95 MiB 253 KiB ok
allocs native_mem_max_bytes 22.93 MiB −24 KiB 23.20 MiB 280 KiB ok
allocs nmt.class 301 KiB +4 KiB 563 KiB 262 KiB ok
allocs nmt.internal 366 KiB −2 KiB 666 KiB 299 KiB ok
classesM native_mem_live_bytes (coverage-corrected) 23.25 MiB −28 KiB 23.55 MiB 305 KiB ok
classesM native_mem_max_bytes (coverage-corrected) 25.24 MiB +47 KiB 25.45 MiB 219 KiB ok
classesM nmt.class 2.94 MiB −1 KiB 3.20 MiB 267 KiB ok
classesM nmt.internal 3.20 MiB +5 KiB 3.50 MiB 302 KiB ok
mixed native_mem_live_bytes 23.24 MiB +89 KiB 23.45 MiB 218 KiB ok
mixed native_mem_max_bytes 40.74 MiB +23 KiB 41.00 MiB 264 KiB ok
mixed nmt.class 301 KiB −6 KiB 563 KiB 262 KiB ok
mixed nmt.internal 408 KiB −1 KiB 717 KiB 309 KiB ok
threads native_mem_live_bytes 19.08 MiB −9 KiB 19.35 MiB 275 KiB ok
threads native_mem_max_bytes 20.10 MiB −15 KiB 20.40 MiB 312 KiB ok
threads nmt.class 114 KiB +1 KiB 410 KiB 296 KiB ok
threads nmt.internal 161 KiB −3 KiB 461 KiB 300 KiB ok
traces native_mem_live_bytes 20.22 MiB −8 KiB 20.50 MiB 285 KiB ok
traces native_mem_max_bytes 21.42 MiB +15 KiB 21.70 MiB 282 KiB ok
traces nmt.class 471 KiB −1 KiB 768 KiB 298 KiB ok
traces nmt.internal 613 KiB −2 KiB 870 KiB 258 KiB ok

✅ nmt.tracing absent in every scenario.

Not budgeted (too noisy on shared runners)
scenario nmt.code nmt.gc nmt.total proc.VmRSS proc.RssAnon
allocs 1.79 MiB 52 KiB 2.72 MiB 30.04 MiB 25.65 MiB
classesM 5.71 MiB 12 KiB 14.14 MiB 43.01 MiB 38.75 MiB
mixed 1.50 MiB 24 KiB 2.47 MiB 36.10 MiB 31.59 MiB
threads 9 KiB 1 KiB 1.40 MiB 25.48 MiB 20.39 MiB
traces 4.14 MiB 5 KiB 5.89 MiB 32.49 MiB 27.85 MiB

@dd-octo-sts

dd-octo-sts Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

❌ 29 passed, 1 failed out of 30 expected configurations

Test Matrix

Platform JDK 8 JDK 11 JDK 17 JDK 21 JDK 25
glibc-x64-hotspot ✅ ✅ ✅ ✅ ✅
glibc-x64-openj9 ✅ ✅ ✅ ✅ ✅
glibc-arm64-hotspot ✅ ✅ ✅ ✅ ✅
glibc-arm64-openj9 ❌ ✅ ✅ ✅ ✅
musl-x64-hotspot ✅ ✅ ✅ ✅ ✅
musl-x64-openj9 N/A N/A N/A N/A N/A
musl-arm64-hotspot ✅ ✅ ✅ ✅ ✅
musl-arm64-openj9 N/A N/A N/A N/A N/A

Failure Details

glibc-arm64-openj9-jdk8

Tracer+profiler:

"  This may indicate tracer is not capturing any requests"
""
"[7/8] Checking for unexpected events..."
"  ? No unexpected events found"
""
"[8/8] Scenario-specific validation (ddprof_with_tracer)..."
"  Validating tracer+profiler scenario..."
"  ? Tracer+profiler scenario checks passed"
""
"=== Validation Summary ==="
"ExecutionSample:            0 events (datadog.ExecutionSample)"
"Stack traces:               0 samples"
"Thread diversity:           0 threads"
"Allocation samples:         0.0 events (jdk.ObjectAllocationSample)"
"ThreadAllocationStatistics: 0.0 events"
""
"VALIDATION_FAILED: One or more checks did not pass"

Script executed successfully: 425 commands
VALIDATION_FAILED: Validation checks did not pass

Links

10 not applicable (not scheduled): musl-x64-openj9, musl-arm64-openj9. OpenJ9 requires glibc; upstream publishes no musl runtime.

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Pipelines

✨ Unblock PR with BitsAI

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 3 Pipeline jobs failed

DataDog/java-profiler | integration-test-arm64-glibc: [openj9, 8] — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

DataDog/java-profiler | post-pr-comment — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

Bits review gate | publish (0e92936)

View more details · View in GitHub Actions

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0e92936 | Docs | View more details | Give us feedback!

@jbachorik jbachorik removed the dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates label Nov 25, 2026
@jbachorik jbachorik changed the title PROF-16810 Read certification verdicts from GitHub PROF-16810 Certify main integration through GitHub Nov 25, 2026
@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: FAIL

A secondary-rate-limit 403 without Retry-After can terminate certification immediately despite remaining retry budget. An offline reproduction confirmed the premature failure.

Open Bits AI session

🤖 Bits Code Review · Commit a3983b5

Comment thread .github/scripts/wait_for_integration.py Resolved
@jbachorik jbachorik added the dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates label Nov 25, 2026
@jbachorik

jbachorik commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator Author

🐶 babysit-pr is watching this PR — CI breakages and mechanical findings are fixed and pushed automatically; design decisions are always brought to you.

This run
  • 17:38 · started · CI on head 1917e2f7f in progress — test matrix running, GitLab pipeline running
  • 17:38 · CI red · codeowner-review/head FAIL — expected human-approval gate, not acted on
  • 17:38 · Bits · auto-review pending on 1917e2f7f (operator trigger comment at 17:36); head already in the once-per-head record — no re-trigger
  • 17:42 · Bits · PASS on 1917e2f7f (review 6062268481) — first green Bits round on this head
  • 17:51 · answered · codex review completed with no findings; PR un-drafted by the operator, test matrix rerunning
  • 18:24 · stopped · test matrix and GitLab green on 1917e2f7f; only codeowner-review/head FAIL remains (human approval required)

✅ stopped 18:26 UTC · CI green (test matrix + GitLab), Bits PASS on 1917e2f7f; no commits pushed; codeowner human approval outstanding


Stop summary — no commits pushed, no findings acted on this run. Threads: 3 trusted Bits threads answered in prior rounds (roots 4694279517, 4695367652, 4697745146) remain answered; 2 untrusted github-code-quality[bot] roots (4694219365, 4698561474) never acted on — left for the author. Bits heads this run: no new triggers (operator's 17:36 trigger covered 1917e2f7f); bits_rerequested empty. Codex review completed with no findings. Open item for the author/humans: codeowner approval (the codeowner-review/head FAIL) — the only gate between this PR and mergeable state.

@jbachorik jbachorik removed the dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates label Nov 25, 2026
@jbachorik
jbachorik force-pushed the drydock/jb-patient-misty-giraffe branch from a3983b5 to 1917e2f Compare November 25, 2026 17:34
Comment thread .github/scripts/wait_for_integration.py Resolved
@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@jbachorik jbachorik added the dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates label Nov 25, 2026

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: PASS

More details

Static review identified no reportable defect in the main-only certification gate or publisher-verified status reader. Producer execution and live GitLab-to-GitHub status delivery remain unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 1917e2f

@jbachorik
jbachorik marked this pull request as ready for review November 25, 2026 17:49
@jbachorik
jbachorik requested a review from a team as a code owner November 25, 2026 17:49
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T17:51:18.737076Z 1917e2f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: PASS

More details

The static review found no actionable defect in the dedicated main-push certification gate. Live GitLab-to-GitHub status delivery and Actions-token permissions remain unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 1917e2f

@jbachorik jbachorik removed the dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates label Nov 25, 2026
@rkennke

rkennke commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Review: optional fixes

Reviewed d743fe4b4..1917e2f7f (merge base to head) with Sphinx at standard effort. No Critical, High or Medium findings. The items below are Low and optional; none blocks the merge.

Docs

  • doc/building/ReleaseTrain.md:105: "pauses up to three minutes" reads as a maximum. retry_delay returns max(POLL_SECONDS, …), so 180 s is the minimum; only the deadline shortens it. Suggested: "The waiter pauses three minutes between snapshots. GitHub's Retry-After or exhausted-quota reset headers can extend that pause."

Test gaps in wait_for_integration.py

Each check below can be removed or weakened without failing a test.

  1. verify_publisher, creator.get("type") != "Bot": the only creator with type: "User" also has id: 1, so the /users identity lookup rejects it first. Add a creator with login gitsync-ddbuild-stable1[bot], id 65570472 and type User. The assertRaisesRegex("publisher") there also matches both error messages; a narrower pattern would pin which check rejected it.
  2. verify_publisher, app.get("slug") != slug: the {"slug": "other"} fixture has no owner, so the owner check rejects it first. Add an app with owner {"id": 365230, "type": "Organization"} and a different slug.
  3. retry_delay, max(POLL_SECONDS, seconds): every valid Retry-After in the tests is 240. Add Retry-After: "60" expecting 180.
  4. retry_delay, seconds >= 0: no case sends Retry-After: "0" with X-RateLimit-Remaining: "0" and a future reset. With > 0, the reset branch would win. Add that case expecting 180.

Items 1 and 2 cover publisher trust. The code is correct, and the /users lookup re-checks the type, so these are defence-in-depth tests, not a gate bypass.

rkennke
rkennke previously approved these changes Nov 26, 2026

@rkennke rkennke 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.

Looks good. Feel free to fix the low findings. Thank you!

@jbachorik
jbachorik force-pushed the drydock/jb-patient-misty-giraffe branch from 1917e2f to 0e92936 Compare November 27, 2026 15:20
@jbachorik jbachorik changed the title PROF-16810 Certify main integration through GitHub PROF-16810 Verify signed certification for mainline releases Nov 27, 2026

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: PASS

More details

Static review found no reportable defect in the exact-SHA, main-only integration gate or release-attestation checks. Live GitLab dependency-failure handling, mirrored-status delivery, and end-to-end certification remain unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 0e92936

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

AI human_review:mandatory Human review required — see PR description

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants