{
  "schema_version": "legipro.cegid_loop_expert_adapter_stub.v1",
  "roadmap_task_id": "SAAS-0047",
  "generated_at": "2026-06-29T08:02:20Z",
  "status": "dry_run_cegid_loop_expert_stub",
  "platform_family": "Cegid Loop / Expert",
  "stub_boundary": {
    "approved_cegid_partnership_claimed": false,
    "approved_platform_access_claimed": false,
    "live_cegid_api_call_attempted": false,
    "third_party_mutation_attempted": false,
    "fixture_only": true
  },
  "public_doc_citations": [
    "https://developers.cegid.com/",
    "https://developers.cegid.com/docreference/BusinessUnits/Loop-Api-Management-Docs/GetStart.html",
    "https://developers.cegid.com/docreference/BusinessUnits/Loop-Api-Management-Docs/Storedocument.html",
    "https://developers.cegid.com/docreference/BusinessUnits/CPA_APIM_STD_DOC/index.html"
  ],
  "auth_header_assumptions": {
    "credential_storage": "server_side_only",
    "browser_bearer_exposure_allowed": false,
    "headers": {
      "Authorization": "Bearer <partner-sandbox-token-placeholder>",
      "Ocp-Apim-Subscription-Key": "<cegid-subscription-key-placeholder>",
      "Idempotency-Key": "cegidstub_def33c77c660ecc706f653c4",
      "X-LegiPro-Dry-Run": "true"
    },
    "notes": [
      "Header names are public-doc-shaped assumptions for screening.",
      "The fixture does not prove activated Cegid API access.",
      "Credentialed promotion requires a separate sandbox gate and written scope."
    ]
  },
  "credential_posture": {
    "mode": "dry_run",
    "credential_required": false,
    "credential_present": false,
    "credential_source": "none",
    "fail_closed": false,
    "fail_closed_reason": null,
    "legipro_token_class": "demo"
  },
  "company_file_context": {
    "tenant_id": "partner-demo",
    "workspace_id": "partner-einvoicing-sandbox",
    "cabinet_id": "cegid-cabinet-demo",
    "company_file_id": "cegid-company-file-demo",
    "fiscal_period": "2026",
    "jurisdiction": "FR",
    "workflow_surface": "invoice review / e-invoicing preparation",
    "source_context": {
      "invoice_kind": "B2B services invoice",
      "supplier_country": "FR",
      "customer_country": "FR",
      "workflow_surface": "invoice review / e-invoicing preparation"
    },
    "snapshot_pin": {
      "corpus_snapshot_id": "legipro-status-20260629T075402Z",
      "index_snapshot_id": "meili-legipro-documents-2026-06-29T07:54:02Z",
      "replay_policy": "snapshot_pinned_required"
    }
  },
  "handoff_payload": {
    "operation": "store_draft_review_packet_as_document_reference",
    "partner_object": "document_or_dossier_attachment",
    "dry_run": true,
    "review_status": "draft_review_required",
    "title": "Draft e-invoicing/VAT review packet",
    "document_reference": {
      "filename": "exp_959f0ad96197-legipro-review.json",
      "content_type": "application/json",
      "external_reference": "exp_959f0ad96197",
      "dossier_id": "dos_959f0ad96197",
      "audit_id": "aud_959f0ad96197"
    },
    "metadata": {
      "answerability_status": "partially_answerable",
      "missing_facts_expected": true,
      "risk_flags_expected": true,
      "human_review_complete": false,
      "client_reliance": false,
      "professional_certification": false
    },
    "source_refs": [
      {
        "source_id": "official.aife.facturation-electronique-b2b",
        "artifact_id": "public.aife.facturation-electronique-b2b",
        "passage_id": "aife.b2b.calendar.2026.reception.issuance.001",
        "authority_rank": 1,
        "effective_date": "2026-09-01",
        "retrieved_by": "explicit",
        "citation_label": "AIFE - Facturation electronique interentreprises"
      },
      {
        "source_id": "official.impots.gouv.fr.facturation-electronique",
        "artifact_id": "public.impots.gouv.fr.e-invoicing-business",
        "passage_id": "impots.facturation-electronique.calendar.2026.001",
        "authority_rank": 1,
        "effective_date": "2026-09-01",
        "retrieved_by": "lexical",
        "citation_label": "impots.gouv.fr - Electronic invoicing calendar"
      },
      {
        "source_id": "legipro.einvoicing.vat.review-card",
        "artifact_id": "legipro.structured-knowledge.einvoicing-vat",
        "passage_id": "legipro.einvoicing.vat.review-card.001",
        "authority_rank": 2,
        "effective_date": "2026",
        "retrieved_by": "graph",
        "citation_label": "LegiPro structured e-invoicing/VAT review card"
      }
    ]
  },
  "dry_run_request": {
    "method": "POST",
    "path": "cegid-loop-expert-docs://Storedocument/dry-run",
    "headers": {
      "Authorization": "Bearer <partner-sandbox-token-placeholder>",
      "Ocp-Apim-Subscription-Key": "<cegid-subscription-key-placeholder>",
      "Idempotency-Key": "cegidstub_def33c77c660ecc706f653c4",
      "X-LegiPro-Dry-Run": "true"
    },
    "body": {
      "company_file_context": "company_file_context",
      "document_reference": "handoff_payload.document_reference",
      "review_metadata": "handoff_payload.metadata",
      "source_refs": "handoff_payload.source_refs"
    }
  },
  "retry_policy": {
    "default_live_network": false,
    "idempotency_key": "cegidstub_def33c77c660ecc706f653c4",
    "retry_statuses": [
      429,
      500,
      502,
      503,
      504
    ],
    "do_not_retry_statuses": [
      400,
      401,
      403,
      404,
      409
    ],
    "backoff_seconds": [
      1,
      2,
      4
    ],
    "max_attempts": 3,
    "fail_closed_on": [
      "missing_token_file",
      "missing_token_env",
      "auth_required",
      "scope_denied",
      "unexpected_live_mutation_attempt"
    ]
  },
  "shared_harness": {
    "schema_version": "legipro.partner_adapter_fixture.v1",
    "roadmap_task_id": "SAAS-0052",
    "asset": "site/legipro-fr/assets/legipro-shared-adapter-fixture-harness-2026-06-29.json",
    "idempotency_key": "adapterdry_ba1c5120ab6713265aabce90",
    "output_artifact_refs": {
      "review_packet_id": "partner_fixture_einvoicing_vat_001",
      "dossier_id": "dos_959f0ad96197",
      "export_bundle_id": "exp_959f0ad96197",
      "audit_id": "aud_959f0ad96197",
      "proof_fixture_asset": "site/legipro-fr/assets/legipro-einvoicing-vat-proof-fixture-2026-06-29.json",
      "adapter_fixture_asset": "site/legipro-fr/assets/legipro-shared-adapter-fixture-harness-2026-06-29.json"
    }
  },
  "output_artifact_refs": {
    "adapter_stub_asset": "site/legipro-fr/assets/legipro-cegid-loop-expert-einvoicing-adapter-stub-2026-06-29.json",
    "fixture_asset": "data/fixtures/partner_integrations/cegid_loop_expert_einvoicing_adapter_stub_2026-06-29.json",
    "dossier_id": "dos_959f0ad96197",
    "export_bundle_id": "exp_959f0ad96197",
    "audit_id": "aud_959f0ad96197"
  },
  "security_denials": [
    {
      "attempted_surface": "legipro_internal_control_plane",
      "requested_route": "/v0/rotor/tasks/next",
      "token_class": "demo",
      "denied": true,
      "reason": "demo_public_token_scope_denied",
      "network_call_attempted": false
    },
    {
      "attempted_surface": "third_party_partner_api",
      "requested_route": "third_party_api://cegid-loop-expert/document-store",
      "token_class": "demo",
      "denied": true,
      "reason": "third_party_live_api_disabled_in_fixture",
      "network_call_attempted": false
    }
  ],
  "network_policy": {
    "default_mode": "dry_run",
    "live_third_party_api_call_attempted": false,
    "live_cegid_api_call_attempted": false,
    "third_party_mutation_attempted": false,
    "allowed_external_calls": []
  },
  "acceptance_summary": {
    "repo_only_stub": true,
    "no_embedded_credentials": true,
    "no_live_network_calls_by_default": true,
    "models_partner_style_auth_headers": true,
    "models_company_file_context": true,
    "models_retry_policy": true,
    "maps_review_dossier_to_document_handoff": true,
    "public_demo_tokens_denied_for_rotor_and_live_api": true
  },
  "boundaries": {
    "scenario_ready": false,
    "answer_ready": false,
    "promotion_allowed": false,
    "human_review_complete": false,
    "client_reliance": false,
    "semantic_search_active": false,
    "professional_certification": false
  }
}
