Skip to content

feat(procore): add RulePackV1.1 evaluation - #32

Merged
mcxl merged 8 commits into
mainfrom
codex/procore-rulepack-v11
Jun 25, 2026
Merged

feat(procore): add RulePackV1.1 evaluation#32
mcxl merged 8 commits into
mainfrom
codex/procore-rulepack-v11

Conversation

@mcxl

@mcxl mcxl commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a deterministic, certification-oriented RulePackV1.1 contract for project-specific SWMS advisory pre-screening.

  • adds a closed Draft 2020-12 JSON Schema and fail-closed pack loader
  • evaluates every atomic criterion with exactly one result: aligned, partial, missing, unclear, or unsupported
  • supports seven non-executable predicate types with no arbitrary customer logic
  • prevents keyword presence from producing aligned
  • preserves unconditional baseline review, existing amendment/comment/audit contracts, and stable resubmission issue keys
  • permits draft packs only with an explicit flag in non-production environments
  • prevents invalid, inactive, missing, or draft production packs from triggering live write-back
  • migrates the pilot fixture to a provenance-ready V1.1 draft pack
  • updates pypdf to 6.13.3 to clear the dependency audit finding

Safety posture

The integration remains advisory and requires human review. This PR does not change Procore endpoints, OAuth, webhook authentication, Supabase migrations, or Procore UPDATE/DELETE behavior.

The following remain external and explicitly unverified: Procore auth/signature scheme, OAuth/DMSA grant and scopes, final write-back resource/path/API version, and live delivery_id/ulid payload location. Live write-back remains separately gated.

Verification

  • focused RulePack tests: passed
  • Procore webhook tests: passed
  • resubmission, audit, and dependency smoke tests: passed
  • full pytest suite: passed in the pre-push gate
  • repository flake8: passed
  • git diff --check: passed
  • pip-audit -r requirements.txt: no known vulnerabilities
  • independent DeerFlow review: PASS WITH CHANGES / GO, with no merge-blocking findings

Follow-up

A legacy direct-call status fallback remains for compatibility. It is not reachable as a write-back bypass because the versioned webhook always injects the validated loader status before enforcing the AVAILABLE write-back gate; retirement can be handled in a later hardening cycle.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25236cc4cb

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread core/procore/rule_pack.py
Comment thread core/procore/prescreen_reviewer.py
@mcxl
mcxl merged commit 05d20a2 into main Jun 25, 2026
1 check passed
@mcxl
mcxl deleted the codex/procore-rulepack-v11 branch June 25, 2026 00:15
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.

1 participant