Worked Examples

Validate scientifically proposal preparation — Contact and Engagement Platform

Validate proposal preparation through controlled tests of inquiry provenance, versioned content, authorized publication, sender approval evidence, and Statement of Work governance. This scientific validation guide provides reproducible experiments, quantitative acceptance criteria, and auditable methods for evaluating proposal integrity while preserving confidentiality and contractual boundaries.

ProductContact and Engagement PlatformComponentProposals, Versioning and IntegrityUpdatedNovember 21, 2026Reading time22 minutes

Application: Contact and Engagement Platform
Component: Proposal Preparation, Versioning and Approval Governance
Source-reviewed product version: 2.0.2; workflow schema 1.3.0 (candidate until installed release confirmed)
Verification state: Source reviewed; 51 offline tests passed; 52 staging cases not executed
Estimated reading time: 20–24 minutes

A professional proposal is a versioned statement of an intended engagement, not evidence that an agreement is signed or that the promised outcomes will occur. This guide tests whether a proposal can be traced from an authorized private inquiry to an authored version, controlled publication, sender response, immutable receipt and—when applicable—a separate Statement of Work (SOW) and external contracting record. The central standard is auditability without unintended publication, altered approval history, cross-inquiry disclosure or an unsupported claim of contract execution.

Goal

Evaluate, using repeatable positive and negative controls, whether proposal preparation preserves the intended document, exact version, source inquiry, responsible actor, status history and authorized visibility. Verify that an accepted response is bound to its published version and retained as an independently checkable approval receipt. Assess error handling and compensation when an intermediate write fails. Report deviations and unresolved results separately.

Requirements

  1. An isolated staging WordPress deployment with synthetic private inquiries, sender-portal test identities, and permission-separated staff accounts; do not use actual client narratives or proposals.
  2. A pinned code revision, installed plugin version, database schema, relevant feature flags, actor/capability assignments, UTC clock, retention posture, and a reversible staging snapshot.
  3. Known test identities for proposal creation (sc_intake_create_proposals), publication (sc_intake_publish_proposals), contract recording (sc_intake_record_contracts), and an authorized sender-portal session.
  4. A source-of-truth register of inquiry ID, portal-access ID, proposal ID, proposal version ID, row version, action, actor, timestamp and evidence artifact; keep this private.
  5. Approval to perform fault injection and staging writes. The accompanying WordPress reconciliation script uses only aggregate SELECTs; it is not a publication or repair command.

Study design and definitions

Study unit: one synthetic proposal lifecycle associated with one authorized inquiry. Observation: a recorded state transition or a private read/write attempt with a known expected result. Outcome: invariant upheld, invariant violated or unknown due to incomplete evidence. Exposure: a deliberately varied factor such as actor capability, stale version, invalid confirmation, duplicate request, database failure or privacy restriction. Comparator: a matched valid lifecycle performed with the same pinned build and a distinct synthetic identity.

Record the test population and time window, separately identifying repeated trials, unique objects and unique actor sessions. Count a failed test only when its expected outcome can be evaluated; retain missing logs or unreadable states as unknown. The study validates engineering controls, not the quality of a commercial strategy, legal enforceability, sales success, causal impact, or scientific validity of the proposal’s subject matter.

Primary hypotheses and falsifiable criteria

Hypothesis Positive control Counterexample or falsification test
H1. A draft is not published by saving it. Create a valid draft; inspect status=draft and a pending version. Save with create-only authority; assert no sender-visible publication.
H2. Every published proposal identifies an exact authored version. Publish version 1; retain version hash and actor. Inject a missing, cross-proposal or stale version pointer.
H3. A sender response has attributable evidence tied to the current version. Accept the published version in an authorized portal session. Submit a stale version, missing attestation or conflicting replay.
H4. Publication never silently replaces an approved SOW. Revise a proposal without an approved SOW; verify governed reconciliation. Attempt to overwrite a sender-approved SOW with a mismatched proposal revision.
H5. Private records remain audience scoped. Authorized staff can view required fields; sender sees only an approved representation. Anonymous, wrong-session or cross-inquiry access to a proposal or its export.
H6. Failures do not silently create approved outcomes. Successful version and approval receipt writes reconcile. Fault-inject receipt, governance or audit persistence and inspect compensating state.

Source-reviewed implementation map

The reviewed WordPress plugin version is 2.0.2 and the workflow schema constant is 1.3.0. The relevant implementation is distributed across SC_EI_Workflow_Repository, SC_EI_Workflow_Admin, SC_EI_Proposal_Governance_Repository, SC_EI_Proposal_Governance_Schema, and SC_EI_Database.

Source function or contract Reviewed behavior Verification boundary
create_proposal() Requires a non-erased inquiry, invited/active sender-portal access, title, executive summary, scope and deliverables; creates a draft plus an initial version. Not proof that the portal invitation can be delivered or activated.
create_proposal_version() Creates numbered versions using SHA-256 over a canonical content array encoded with wp_json_encode(); retries bounded insert collisions. Schema-level hash presence is not independent verification of the content’s accuracy.
publish_proposal() Checks pending version, hash and SOW guard; optimistically updates status/current pointer and reconciles SOW state. A rollback is attempted after SOW reconciliation failure; the operator must verify whether compensation succeeded.
respond_to_proposal() Checks sender confirmation, applicable authority and boundary acknowledgments; commits a versioned approval receipt with a compensating rollback on failure. Portal acceptance means intent to proceed to contracting, not an executed contract.
record_sender_action() Binds an approval action to a current proposal version and authorized sender session; stores confirmation and integrity hashes; checks idempotent replay consistency. Hash existence alone does not prove who operated a compromised session.
reconcile_after_proposal_publication() May supersede an earlier SOW, but rejects a newer proposal revision that would replace a sender-approved SOW. Downstream copies and external contracting systems require separate inspection.

Canonical objects and provenance

The proposal row links inquiry_id and access_id to the sender context. The proposal carries current_version_id, pending_version_id, status, row_version, currency, total_minor, published_by, published_at, accepted_at and the external contract_reference. Content is stored in proposal_versions, with version_number, title, summary, scope, deliverables, assumptions, exclusions, terms, content hash, creator and creation time. Evidence of the sender response belongs in the separate proposal_approvals ledger.

Important: a published proposal may legitimately retain a new pending version during editing. Do not flag every non-null pending_version_id on a published proposal as a defect. Instead, confirm that the current_version_id remains stable until the new version is deliberately published; then check the resulting transition and approval/SOW relationships.

State and authorization boundaries

Reviewed workflow states include draft, published, changes_requested, accepted_pending_contract, declined, contracted, withdrawn, expired, superseded and converted_to_engagement. These are values, not permission to apply arbitrary transitions. Test actual allowed actions against the specific staff or portal handler, including nonce verification and confirmation phrases. Staff creation and publication are different capabilities; for example, publishing requires sc_intake_publish_proposals and an explicit confirmation beginning with PUBLISH. Recording a contract requires another capability and a separate act.

Method and evidence

Prepare a preregistered synthetic test protocol containing build SHA, hypotheses, cases, predicted outcomes, sample and exclusion rules, versions, operators, observation fields and stopping conditions. Use fresh isolated inquiries for cross-scope tests, distinct portal sessions for identity tests, and retained before/after database counts for write-path tests. The evidence packet should contain only pseudonymous test IDs, categorical states, version numbers, hashes, capability labels, timestamps, log event types and outcomes; keep any secrets or contact details out of the report.

Use at least two independent observation channels where possible: the proposal/SOW tables and the workflow/approval ledger. If the administrative UI says “published” but the private ledger or sender projection disagrees, do not resolve the discrepancy by choosing the more convenient observation. Preserve the disagreement as a finding until it can be explained.

Sampling, controls and exclusions

Use a stratified design covering initial drafts, edits to published proposals, requests for changes, accept/decline responses, receipt retries, SOW conflicts, expiry, withdrawal, staff roles, sender sessions, and cache conditions. For each category, include at least one positive and one negative control. Balance ordinary and adversarial cases. Exclude malformed fixtures only under predeclared criteria; report all excluded cases and why they were excluded. If the installed configuration differs from the reviewed source, analyze it as a separate stratum rather than pooling versions.

Procedure

  1. Baseline: record the release SHA, WordPress/PHP versions, table migration status, installed settings, roles and capabilities; confirm private portal access in staging.
  2. Draft: create a proposal with title, summary, scope and deliverables under an authorized inquiry. Verify draft state and exactly one initial numbered version. Repeat with each required field missing; expect rejection.
  3. Revision: add a new version and compare current_version_id, pending_version_id, version_number, content_hash, created_by, and row_version. Confirm the prior published version remains retrievable to authorized staff.
  4. Publication: publish using an authorized staff actor with a valid nonce and exact confirmation. Confirm the pending version becomes current, publication attribution is persisted, and a workflow event exists. Attempt the same transition without the publication capability.
  5. Sender response: act from a legitimate sender-portal session. Test receipt, change request, acceptance and decline, including intentionally incorrect confirmation phrases and missing attestations.
  6. Receipt: reconcile sender response to an approval row for the exact proposal/version/action/session and inspect the recorded content-integrity and confirmation hashes. Test consistent replay and conflicting replay.
  7. SOW: publish a revised proposal against draft, approved and sender-approved SOW states. Verify the final version linkage, correct supersession, and refusal to overwrite a sender-approved SOW.
  8. Failure injection: in staging only, fail the approval-ledger write and SOW reconciliation at separate points. Record whether compensation returned the prior proposal state and whether any orphaned artifacts remain.
  9. Privacy: test anonymous, wrong-inquiry and mismatched sender access to proposal views and exports. Confirm that restricted inquiry material, internal notes and private approvals are absent from public and unintended sender output.
  10. Release decision: reconcile all observations, document unknowns, independently review high-impact exceptions and apply the acceptance rules below before marking the feature verified.

Version numbering and cryptographic integrity

In source, the version content hash is derived from a specific PHP array of sanitized fields serialized by WordPress wp_json_encode(). A generic re-serialization of a displayed proposal can produce a different digest because key order, whitespace, Unicode handling, selected fields and data types differ. Independent hash verification requires reconstructing exactly the canonical source array and encoding in the reviewed implementation. A 64-character hexadecimal value confirms only the format; it does not verify the underlying content. Treat two identical digests as evidence of identical canonical bytes under the given algorithm—not as proof that the described work or assumptions are valid.

# Standard-library example: hash a known canonical byte string.
# Do not compare this sample directly against WP hashes without matching
# the source's exact wp_json_encode() serialization contract.
import hashlib
canonical = b'{"title":"Synthetic study","scope":["Review"]}'
print(hashlib.sha256(canonical).hexdigest())

Approval receipts, session identity and replay

For sender acceptance, review SC_EI_Proposal_Governance_Repository::record_sender_action(). It checks the current proposal version, authorized portal session, exact confirmation and attestations; it records a confirmation hash and an immutable evidence hash. A repeated matching receipt is treated idempotently; a conflicting replay is rejected. The compatibility callback capture_workflow_sender_response() is a no-op in this reviewed code, because synchronous approval recording occurs inside the response path. Do not design tests that expect the old hook to independently create the receipt.

There are two separate hypotheses: the ledger row is present and the evidence genuinely corresponds to the authorized sender action. The latter needs session authorization tests, anti-replay tests and integrity recomputation in the application—not simply a count of rows.

Proposal publication and Statement of Work safeguards

Publication is guarded by validate_proposal_publication(). A sender-approved SOW tied to a previous proposal version blocks replacement by an incompatible new version. Non-final SOW records can be superseded through reconcile_after_proposal_publication(). A failure after the proposal publication write invokes a compensating rollback; this is not an assertion that all downstream steps are an atomic database transaction. Verify both the prepublication and postcompensation snapshots. Review any proposal_publication_sow_reconciliation_failed reliability event privately.

When a sender accepts a published proposal, the resulting state is accepted_pending_contract. A portal receipt does not constitute a signature or legally executed agreement. Contract recording and conversion into an engagement remain separate governed stages. Do not infer revenue, payment, project authorization or legal acceptance merely from a proposal status.

Consent, inquiry status and audience restrictions

A proposal must remain associated with its originating inquiry and intended sender-portal access. Validate restrictions based on the installed roles, portal session and any privacy state changes. Anonymous access must not reveal the proposal, source inquiry, private approval ledger, contractual notes, participant contact data or privileged exports. A legitimate sender must not be able to enumerate an unrelated inquiry. Review both body fields and metadata such as headers, cache keys and response timing for inadvertent leakage. Public documentation may use only synthetic test data.

Read-only WordPress reconciliation

The developer package includes read_only_proposal_reconciliation.php. It uses the actual WordPress table-prefix helper and SELECT-only SQL to report aggregate recent proposal states, missing publication evidence, orphaned version pointers, approval-to-version mismatches, acceptance without a matching sender receipt and conflicting sender-approved SOW versions. It does not export proposal bodies, emails or contact identities. It is an internal operator diagnostic, not a new REST endpoint.

# Replace both placeholders with authorized paths on the chosen WordPress host.
WP_PATH='/approved/wordpress/root'
SCRIPT='/private/operator/read_only_proposal_reconciliation.php'
wp --path="$WP_PATH" plugin get sustainable-catalyst-engagement-intake --field=version
wp --path="$WP_PATH" eval-file "$SCRIPT"

Do not publish very small group counts, or use this tool as proof that no record is exposed through caches, historical backups, sender links, webhooks or unauthorized external exports. Any reported mismatch requires a scoped, privileged investigation before mutation.

Reproducible independent offline diagnostic

The accompanying proposal_validation.py analyzes a synthetic observation packet. Its JSON is a documented test-model format, not the WordPress database schema or an implemented public API. It detects missing links and version hashes, inaccurate status evidence, missing approval receipts, approval replay, inconsistent SOW linkage, and privacy exposure flags. It also computes 95% Wilson score intervals for observed binary outcomes, excluding unknowns from the observed denominator but reporting them separately.

cd proposal_preparation_scientific_validation
python3 -m unittest -v tests_proposal_validation
python3 proposal_validation.py fixtures/valid_proposal_study.json --pretty
# Deliberately fails with exit status 2 because this fixture contains defects:
python3 proposal_validation.py fixtures/invalid_proposal_study.json --pretty

The recorded offline run passed 51/51 unit tests, and the clean synthetic packet produced zero findings. The deliberately invalid packet produced 35 diagnostic findings. These validate the independent checker’s designed behavior, not the installed platform’s proposal pipeline.

Quantitative measurements and statistical uncertainty

Report the eligible attempted, observable, failed, passed, and unknown counts for each test group. Define a proposal-version mismatch rate as mismatched current/pending pointers divided by observed proposals; an unauthorized disclosure rate as unauthorized successful private reads divided by evaluated unauthorized read attempts; an approval completeness rate as accepted proposals with valid version-matched receipts divided by observed accepted proposals; and a compensation failure rate as incompletely restored state divided by observed deliberately faulted transactions.

# Observed failures / observed trials, with unresolved cases reported separately.
from proposal_validation import wilson_interval
attempted, failures, unknown = 30, 0, 0
observed = attempted - unknown
print({"attempted": attempted, "observed": observed,
       "failures": failures, "unknown": unknown,
       "wilson_95": wilson_interval(failures, observed)})
# Zero observed failures in 30 trials still gives a nonzero upper bound.

Use Wilson or exact binomial intervals when independent Bernoulli assumptions are reasonable. For zero failures in 30 independent trials, the upper 95% bound is roughly 11.4% with the two-sided Wilson interval; the familiar rule-of-three approximation gives 10% as a rough one-sided bound. Neither supports a “100% reliable” conclusion. If tests share actors, caches, database replicas or fault injectors, acknowledge correlation. For content quality, use blinded independent reviewers with a predefined rubric and disclose inter-rater disagreement rather than substituting workflow success for scientific accuracy.

Evidence completeness and experimental validity

A valid trial needs the exact build, setup, request type, expected outcome, observed state, relevant database and approval artifacts, privacy-safe event identifiers, and a recorded disposition. Capture failures at the point where they arise. Do not use a later successful retry to erase an earlier failure. If a record is missing because a test harness crashed, mark it unknown until independently established. A reliable system can still produce misleading proposal assertions; a well-authored proposal can still move through an insecure workflow.

Symptoms

Observed anomaly First evidence to inspect Potential boundary
Draft visible as published Actor capability, status, current/pending version, publish confirmation Publication authorization or unexpected immediate-publish path
Sender accepts an old version Current published version and approval receipt version ID Stale portal render or version check
Hash present but content disagrees Canonical serialization and source content before publication Hash reconstruction or unauthorized mutation
Version revision overwrites approved SOW SOW status and proposal-version binding Governance publication guard
Portal acceptance shown as contract Acceptance timestamp, receipt, contract reference, external evidence Incorrect status semantics
Failed receipt write yet accepted state persists Reliability event, before/after state, compensation result Approval commit or rollback failure
Unrelated sender sees proposal Session inquiry association, role, cache and export route Cross-inquiry privacy breach

Cause

Prioritize errors by the earliest breached invariant. Source data issues include missing inquiry/portal associations or incomplete content. Versioning issues include outdated pointers, retries or conflicting concurrent edits. Governance issues include a sender-approved SOW, stale approval receipt or absent authority attestation. Persistence issues include a failed approval insert, missing workflow event, or compensation failure. Delivery/privacy issues include a mismatched session, unsafe export, cached private body or unauthorized public visibility. Do not classify all these conditions as a single “proposal error.”

Troubleshooting

  1. Freeze the failing synthetic request and note its build SHA, actor class, proposal ID, version number, expected status and timestamp.
  2. Check the originating inquiry and portal state before checking content. Validate the actor against the exact capability or sender session required by the relevant handler.
  3. Resolve the current and pending version pointers. Confirm each version belongs to the same proposal and that publication used the intended numbered version.
  4. Reconcile the proposal status against workflow events, publication actor/time, sender response and version-specific approval receipt; verify that a portal response is not mislabeled a contract.
  5. Inspect any associated SOW, especially a sender-approved one, before attempting a re-publication or rollback.
  6. Review hardening/audit event classes and database errors using nonsecret identifiers. If a write result is unknown, do not retry until prior side effects are reconciled.
  7. Reproduce with a controlled positive and negative test. Keep production records unchanged and use staged migration or repair only after an approved backup and review.

Resolution

Finding Controlled recovery Acceptance evidence
Invalid draft inputs or inquiry mapping Correct authorized synthetic inputs; preserve the failed attempt Invalid records remain rejected; valid drafts attach to exactly one inquiry
Missing/foreign version pointer Stop publication; reconcile version lineage from source and authorized ledger Current version belongs to proposal, with matching authored content and actor
Stale approval or conflicting replay Reject the replay; verify the original approval receipt, session, action and hash No new contradictory approval state; evidence remains attributable
Approved SOW conflicts with revision Use governed change control or a new proposal; do not overwrite sender approval SOW approval and source version remain intact
Partial publication or receipt write Preserve error/compensation evidence; repair cause in staging and retest Before/after states reconcile without unauthorized publication
Private data exposure Disable the leaking route, revoke unsafe access and investigate privately Anonymous and cross-inquiry tests fail closed; authorized access still works

Validation

The principal acceptance criterion is that proposal versions and approval status remain auditable across the complete lifecycle. At minimum, the staging run must establish that: (a) a draft save does not publish, (b) each published state references a valid, recorded version, (c) each sender response is tied to the correct session/version/confirmation, (d) conflicting replays fail, (e) a sender-approved SOW cannot be silently superseded, (f) failed approval persistence is detected and compensated or explicitly marked unresolved, and (g) unrelated viewers cannot retrieve private proposals or approval evidence.

Verification

Accept the tested deployment only after an authorized operator confirms the pinned installed build, representative happy-path and counterexample runs, negative permission tests, current-to-pending version consistency, SOW guard, approval replay behavior, private cache/export boundaries, safe compensation, and complete evidence packet. Record an owner decision for every exception. The package includes 52 staging cases labeled NOT RUN; neither the offline suite nor a PHP syntax check substitutes for executing them. Do not mark the Knowledge Base field “Last verified version” until those deployment checks are completed.

Reporting boundary

Public reporting may describe architecture, test methodology, software versions, sample sizes, aggregate outcomes, failure categories and reproducible synthetic cases. It must not publish inquiry contents, proposal terms, client details, approval confirmations, raw portal tokens, private Statement of Work content, signatures, financial data, confidential exports or identity-bearing audit logs. Suppress small cohorts that could indirectly reveal a sender. Distinguish an observed implementation defect from a proposed future safeguard, and a source-reviewed control from a deployed control. This procedure is a technical validation method, not a legal determination of contract enforceability or a peer-reviewed scientific study.

Technical references and source provenance

Evidence status: Only the cited source commit was examined for implementation claims. The accompanying validator tests synthetic observations. No production proposal, user, payment, portal session or external contract was accessed or changed.

Scroll to Top