Skip to content

fix(governance): replace hard-coded deal value readiness gate - #641

Merged
seonghobae merged 8 commits into
mainfrom
fix/acquisition-readiness-profile-636
Aug 11, 2026
Merged

fix(governance): replace hard-coded deal value readiness gate#641
seonghobae merged 8 commits into
mainfrom
fix/acquisition-readiness-profile-636

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Why

Sales readiness previously defaulted --contract-value-krw to KRW 2B and presented that figure as a product-quality gate.

What

  • Default contract value is unset unless the caller supplies a deal scenario
  • Add public --require-acquisition-readiness evidence completeness flag
  • Neutralize help text that encodes KRW 2B as readiness proof
  • Optional contract equality checks only enforce when a value is supplied

Verification

  • tests/test_acquisition_readiness_contract.py
  • tests/test_sales_readiness.py
  • tests/test_enterprise_due_diligence_gate.py

Summary by CodeRabbit

  • New Features
    • Added an acquisition-readiness evidence gate for the sales-readiness CLI.
    • Deal scenarios can now be supplied explicitly instead of relying on a default contract value.
  • Bug Fixes
    • Removed the fabricated KRW 2 billion default from readiness checks.
    • Contract-value validation is skipped when no scenario value is provided.
  • Documentation
    • Added guidance on using the acquisition-readiness gate, evidence requirements, and testing standards.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: cef5fb1d-411b-4837-ae7f-d5990936a26b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The sales-readiness CLI no longer fabricates a KRW 2B contract value. Validators accept omitted deal values, and a public --require-acquisition-readiness flag enables product-readiness evidence checks.

Changes

Acquisition readiness

Layer / File(s) Summary
Optional contract validation
scripts/sales_readiness.py
The readiness validators skip contract comparisons when no deal value is supplied. They retain strict matching for supplied values.
Readiness CLI gate
scripts/sales_readiness.py
--contract-value-krw now defaults to None. --require-acquisition-readiness enables the 20B product evidence profile without a contract value.
Public contract and documentation
tests/test_acquisition_readiness_contract.py, docs/doctoring/acquisition_readiness_gate.md, docs/changelog.d/641-acquisition-readiness-gate.md
Tests verify parser behavior and help text. Documentation records the updated readiness contract and CLI options.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLIParser
  participant run_sales_readiness
  participant ReadinessValidators
  CLIParser->>run_sales_readiness: parse --require-acquisition-readiness
  run_sales_readiness->>ReadinessValidators: enable 20B product evidence without contract value
  ReadinessValidators-->>run_sales_readiness: return evidence validation results
Loading

Possibly related issues

  • Issue 636: The changes implement the acquisition-readiness redesign by removing the hard-coded KRW 2B default and adding the generic readiness gate.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: replacing the hard-coded deal-value readiness gate.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/acquisition-readiness-profile-636

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

@opencode-agent address

Exact RED is now proven; this is the bounded implementation handoff for issue #636 / Draft #641. Immediately before any write, refetch #641 exact head, protected main, current comments/reviews and the target scripts/sales_readiness.py plus affected tests/docs. Proceed only if source remains 3919471c29d21a548af17c810212fa3d475be1d3, live main remains a7be9eb8ca0b807364173f8471fc300e3cf9350f, and no other current-head source writer appears.

Exact fail-first evidence: CI run 31356166061, Python job 93356163605, synthetic merge 242123dbdf7aaf01ee3ae2cbd5dc52edbfaaeb51. Full Python suite completed 3 failed, 2948 passed, 2 skipped; the ONLY failures are the three new acquisition-readiness public-contract tests: default contract_value_krw is 2000000000 instead of None; --require-acquisition-readiness is unrecognized; and CLI help still contains KRW 2B review / Target contract value for this gate. Existing sales-readiness tests and changelog contract are GREEN. Rust, package/reinstall/release acceptance, GPU, fuzz, Security Scan and SAST are GREEN. The _log_sigmoid warning is unrelated #583/#564 and must not be changed here.

Implement the minimum GREEN without weakening existing readiness evidence:

  1. Add a truthful generic --require-acquisition-readiness profile. It should require the existing buyer/procurement/release-evidence/benchmark/PR-queue/Figma evidence families needed for acquisition-grade diligence, but must not make a transaction price itself a quality criterion.
  2. Change --contract-value-krw to optional explicit scenario metadata (default=None) with truthful help. No value may be fabricated when the caller omits it.
  3. Preserve --require-20b-product only as a deterministic deprecated compatibility alias for one migration window if existing automation/tests require it. Its help/docs must state compatibility/deprecation semantics, not “KRW 2B readiness proof”. If legacy alias semantics require the historic KRW 2B scenario, resolve that value internally only for that explicit legacy alias; do not mutate the parsed default or generic profile.
  4. Separate generic readiness evidence from legacy REQUIRED_20B_* identity. Rename package-private/internal symbols where feasible in this bounded slice; where machine-readable compatibility fields must survive, mark them legacy/versioned and add explicit migration tests. Do not break current consumer manifests silently.
  5. Downstream buyer packet/release index/procurement/queue/Figma contract-value equality checks should run only when an explicit scenario value is supplied (or an explicit legacy alias resolves one). Absence must not invent a value or reject an otherwise complete generic evidence profile merely because a historical artifact contains one. Explicit mismatches continue to fail closed.
  6. Manifest output must distinguish generic acquisition-readiness requirement, legacy compatibility alias state, and optional explicit contract-value scenario. Never claim valuation, acquisition probability, guaranteed sale, certification or fairness/validity from this gate.
  7. Preserve all digest/source traceability, exact evidence paths, release/security/scientific gates and bounded input behavior. Add focused migration/backward-compatibility tests, beginner-readable docs, authoritative changelog fragment and renderer update/check.
  8. Run focused test_acquisition_readiness_contract.py + existing test_sales_readiness.py and related buyer/procurement/release/queue/Figma tests, meaningful changed-production statement/branch/docstring coverage, then full applicable Python/Rust/PyO3/package/GPU/fuzz/Security/SAST gates on one unchanged head. Keep Draft and stop source writes after one coherent verified update; current-head review/Ready/merge returns to the maintainer loop.

Do not touch canonical docs #604, dependencies/workflows, psychometric numerical code, provider credentials, package version/release or hosted CRM/valuation services.

Copy link
Copy Markdown
Contributor Author

@jules address

Fallback sole branch writer for exact Draft #641 head 3919471c29d21a548af17c810212fa3d475be1d3 over protected main a7be9eb8ca0b807364173f8471fc300e3cf9350f. The prior OpenCode implementation handoff 5236002694 has no receipt/reaction and the source head has not moved since the intentional RED; treat it as inactive. Final-refetch head/main/comments plus the target files before writing and abort if either ref moves or any other current source writer appears.

Preserve the proven RED boundary and implement the smallest acquisition-readiness correction from #636 without weakening evidence gates: make generic acquisition readiness price-neutral, make contract_value_krw optional explicit scenario metadata, add the truthful --require-acquisition-readiness profile, and retain --require-20b-product only as a clearly deprecated compatibility alias where current consumers require it. Do not fabricate a value when the generic path omits one. Explicit scenario mismatches must still fail closed. Keep machine-readable legacy fields only where backward compatibility requires them and label/version them explicitly rather than presenting a transaction price as product-quality evidence.

Run the focused acquisition-readiness tests plus existing sales-readiness/buyer/procurement/release-index/PR-queue/Figma contracts, then full applicable tests. Add beginner-readable migration/doctoring and an authoritative changelog fragment only after product GREEN, deterministically render/check CHANGELOG.md, inspect the net diff, and commit one coherent bounded update. Preserve all digest/source/security/scientific evidence, do not make valuation/acquisition-probability/certification claims, and do not touch canonical #604 docs, dependencies/workflows, psychometric numerics, provider credentials, package version/release, hosted CRM/FX/valuation services, reviewer authority, or Ready/merge state. Stop source writes after that verified update; final exact-head CI/Security/SAST/review returns to the maintainer loop.

Copy link
Copy Markdown
Contributor Author

@opencode-agent address

Fresh maintainer-loop takeover for exact Draft #641 head 3919471c29d21a548af17c810212fa3d475be1d3 over protected main a7be9eb8ca0b807364173f8471fc300e3cf9350f. The prior exact RED→GREEN handoff 5236002694 is about 20 hours old, has no reaction/receipt, and the source head has not moved; treat it as stale predecessor writer evidence. Immediately before writing, refetch head/main/comments/reviews and scripts/sales_readiness.py plus affected tests/docs; abort if refs or writer state changed.

The production-boundary RED remains exact: CI 31356166061, Python job 93356163605, synthetic merge 242123dbdf7aaf01ee3ae2cbd5dc52edbfaaeb51 finished 3 failed, 2948 passed, 2 skipped and only the new acquisition-readiness contract failed: a fabricated default KRW 2B deal value, missing generic --require-acquisition-readiness, and public help presenting the KRW 2B scenario as readiness proof. Existing readiness/changelog tests, Rust, package/reinstall/release acceptance, GPU, fuzz, Security Scan and SAST were green; _log_sigmoid remains unrelated #583/#564.

Implement the minimum GREEN without weakening evidence gates: add a truthful generic acquisition-readiness profile; make --contract-value-krw optional explicit scenario metadata with default=None; keep --require-20b-product only as a clearly deprecated deterministic compatibility alias for the migration window if current consumers require it; separate generic readiness from legacy REQUIRED_20B_* identity; perform deal-value cross-artifact consistency only for an explicit scenario or explicit legacy alias; and ensure output distinguishes generic evidence readiness, legacy compatibility state and optional transaction scenario without claiming valuation/acquisition probability/certification/validity. Preserve digest/source traceability, buyer/procurement/release/queue/Figma evidence families, bounded inputs and all scientific/security gates.

Run the new contract together with all existing sales-readiness/buyer/procurement/release/queue/Figma tests, then meaningful changed-production statement/branch/docstring coverage and complete applicable Python/Rust/PyO3/package/GPU/fuzz/Security/SAST on one unchanged head. Add bounded migration/doctoring/changelog material and render/check managed CHANGELOG.md only after GREEN. Keep Draft and stop source writes after one coherent verified update; final review/Ready/merge returns to the maintainer loop. Do not touch canonical #604/#621 docs, psychometric numerics, dependencies/workflows, package version/release, provider credentials or hosted valuation/CRM services.

Copy link
Copy Markdown
Contributor Author

@opencode-agent address

Fresh current-main reconciliation + GREEN handoff for Draft #641. The previous handoff was explicitly bound to protected main a7be9eb8... and is stale after protected-main movement. Immediately refetch #641 exact head, live main, comments/reviews and target paths; proceed only if source remains 3919471c29d21a548af17c810212fa3d475be1d3 and live main is still compatible with 56967deceafeb7ecd0ff08a98f196282a6ec81a3. Abort if another writer appears or either ref moves.

Fresh compare is diverged, ahead 1 / behind 151, merge base a7be9eb8ca0b807364173f8471fc300e3cf9350f; the only unique path is the intentional RED tests/test_acquisition_readiness_contract.py. Reconcile current protected main non-destructively first and preserve all accepted recent evidence/release-governance behavior. Prior RED stays historical evidence only.

Then implement the minimum #636 GREEN without weakening any evidence gate: generic acquisition-readiness profile; optional contract_value_krw with no fabricated default; deterministic deprecated --require-20b-product compatibility semantics only if still needed; separate generic readiness from legacy monetary identity; run cross-artifact amount equality only when a scenario value is explicitly supplied/resolved by an explicit legacy alias; expose manifest state clearly without valuation/acquisition-probability/guaranteed-sale/certification claims. Preserve digest/source traceability and buyer/procurement/release/queue/Figma/scientific/security evidence. Add migration tests, beginner docs/changelog and same-head gates. Do not touch psychometric numerics, dependencies/workflows/version/release or canonical #604 docs. Keep Draft for final review/merge.

…l value

Stop defaulting sales readiness to KRW 2B, expose a truthful
--require-acquisition-readiness gate, and keep optional contract values
caller-supplied only.
@seonghobae
seonghobae force-pushed the fix/acquisition-readiness-profile-636 branch from 3919471 to 2f2145a Compare August 11, 2026 08:29
@seonghobae
seonghobae marked this pull request as ready for review August 11, 2026 08:29

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/doctoring/acquisition_readiness_gate.md`:
- Line 5: Update the citation in the acquisition readiness gate documentation to
include a stable source link and a brief summary describing the Standards’ scope
and relevance to the gate. Preserve the full citation and follow the repository
guidance for linking the source, using a PDF when redistribution is permissible
or otherwise providing the citation and link.

In `@scripts/sales_readiness.py`:
- Around line 1365-1367: Replace the conversion in
scripts/sales_readiness.py:1365-1367 with a distinct generic
acquisition-readiness profile that activates all required generic validators
without 20B pricing or legacy file/token requirements; update manifest
generation at scripts/sales_readiness.py:1456-1467 to record generic readiness,
legacy compatibility mode, and optional transaction scenario separately, and
mark or remove the deprecated --require-20b-product option at
scripts/sales_readiness.py:1507-1514. Extend
tests/test_acquisition_readiness_contract.py:35-47 to execute the generic gate
and verify validators and manifest identity, then update the documented behavior
in docs/doctoring/acquisition_readiness_gate.md:9-17 and
docs/changelog.d/641-acquisition-readiness-gate.md:3.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 372eb1e2-8bc5-45c5-83d1-cf0a08203386

📥 Commits

Reviewing files that changed from the base of the PR and between e64d0c9 and ed22861.

📒 Files selected for processing (4)
  • docs/changelog.d/641-acquisition-readiness-gate.md
  • docs/doctoring/acquisition_readiness_gate.md
  • scripts/sales_readiness.py
  • tests/test_acquisition_readiness_contract.py

Comment thread docs/doctoring/acquisition_readiness_gate.md Outdated
Comment thread scripts/sales_readiness.py Outdated

Copy link
Copy Markdown
Contributor Author

@opencode-agent address

Exact-current governance defect remains on #641 head 69361015a37610b986667a7e08c94373e5110a79 over protected main d2301dccb7d39a794d08cc96ea8c858b9ff49125; exact scripts/sales_readiness.py blob reviewed is 3aebee042e36696fc3175725674458f09c1f0bdd. Refetch head/base/blob/writer state before any write and abort if they move.

The branch removes the implicit numeric default, but it does not yet satisfy issue #636's machine-identity/terminology migration. The generic --require-acquisition-readiness path simply mutates args.require_20b_product = True and continues through _validate_20b_product_evidence, REQUIRED_20B_PRODUCT_FILES, 20b:* check identities, docs/20b_product_readiness.md, and a REQUIRED_DOC_TOKENS requirement for literal KRW 2,000,000,000 in docs/enterprise_sales_readiness.md. That means the new generic gate is still implemented by, and machine-identifiable as, the obsolete KRW-2B readiness contract. It also makes a generic acquisition-readiness run fail if the buyer documentation truthfully removes the old literal currency target.

Keep #641 unmergeable until the GREEN closes the actual #636 acceptance boundary:

  1. Add fail-first tests proving generic acquisition readiness has no required 20b/KRW-2B machine identity or literal-money documentation token, while preserving a deterministic deprecated compatibility alias only where a published interface truly requires it.
  2. Introduce current internal names (REQUIRED_ACQUISITION_READINESS_FILES, _validate_acquisition_readiness_evidence, acquisition_readiness:* checks or equivalent) and route the generic flag directly through them. Do not implement the generic path by flipping the legacy flag.
  3. If --require-20b-product is retained for one release cycle, make it a versioned deprecated alias that maps into the generic profile and emits a stable non-secret deprecation/manifest signal; legacy names must not remain the source of truth.
  4. Remove the generic profile's dependency on literal KRW 2,000,000,000. Optional caller-supplied deal scenario value/currency may be consistency-checked, but no absence/default/readiness PASS may fabricate or require that amount.
  5. Update tests/doctoring/changelog and docs: establish canonical product and architecture baseline #604/docs: close canonical documentation fitness gaps without parallel authority #621 terminology handoff after GREEN. Preserve all scientific/security/provenance/buyer evidence gates; do not weaken them.

CodeRabbit's current walkthrough explicitly says the new flag “enables the 20B product evidence profile”; that is evidence the semantic migration is still incomplete, not acceptance.

Copy link
Copy Markdown
Contributor Author

@opencode-agent address

The acquisition-readiness machine-identity defect remains on exact current head 7c19ca290ff22292020bd4711ad0474e0a5344fd over protected main d2301dccb7d39a794d08cc96ea8c858b9ff49125; exact scripts/sales_readiness.py blob remains 3aebee042e36696fc3175725674458f09c1f0bdd. Refetch head/base/blob/comments immediately before writing and abort if any moves or another writer is active.

The generic acquisition-readiness path is still backed by legacy REQUIRED_20B_PRODUCT_FILES, _validate_20b_product_evidence, 20b:* check identities and literal KRW 2,000,000,000 required documentation tokens. Removing only the CLI default did not complete issue #636's source-of-truth migration.

Finish the previously scoped migration on this exact head: add current generic internal names/check identities and route --require-acquisition-readiness directly through them; retain --require-20b-product only as an explicit versioned deprecated alias if compatibility is required; remove generic readiness dependence on the KRW-2B literal/20b-named docs while preserving all substantive buyer/security/scientific/provenance/Figma/release evidence gates; optional caller-supplied deal value may be consistency-checked but never fabricated or required for generic readiness. Add fail-first machine-identity/deprecation tests, update doctoring/changelog, and rerun all same-head gates. Keep #641 unmergeable until the generic path no longer reports itself as a 20B profile.

@seonghobae
seonghobae merged commit f92db2d into main Aug 11, 2026
34 checks passed
@seonghobae
seonghobae deleted the fix/acquisition-readiness-profile-636 branch August 11, 2026 09:38
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