Implementation Corrections

Executive Summary

This document identifies and corrects inconsistencies between the IETF vCon specification (draft-ietf-vcon-vcon-core-02, v0.4.0) and the MCP Server implementation specification. These corrections are critical for ensuring compliance with the vCon standard and interoperability with other vCon implementations.

Critical Inconsistencies Found

1. Analysis Object Schema Field Naming

Issue: Field name mismatch between spec and implementation

IETF Specification (Section 4.5.7):

schema: "String" (optional)

Current Implementation:

  • Database schema uses: schema_version TEXT

  • Tool definitions use: schema_version

  • Type definitions use: schema_version

Impact:

  • Non-compliant vCons will be created

  • Interoperability failures with other vCon systems

  • Database queries will fail to find analysis by schema

Correction Required:


2. Analysis Vendor Field Requirement

Issue: Vendor field optionality differs from specification

IETF Specification (Section 4.5.5):

Current Implementation:

  • Database schema: vendor TEXT (nullable)

  • Tool definitions mark vendor as optional

Impact:

  • vCons may be created without required vendor information

  • Non-compliant with IETF specification

Correction Required:


3. Analysis Body Field Data Type

Issue: Body field storage type incompatible with specification

IETF Specification (Section 4.5.8):

The body should be able to store ANY string content, including non-JSON formats.

Current Implementation:

Impact:

  • Cannot store non-JSON analysis bodies (CSV, plain text, XML, etc.)

  • Forces all analysis to be JSON format

  • Data loss when storing non-JSON analysis results

Correction Required:

Migration Strategy:


4. Encoding Field Default Values

Issue: Inconsistent default values for encoding across objects

IETF Specification (Section 2.3.2):

Current Implementation:

  • Analysis table: encoding TEXT DEFAULT 'json'

  • Dialog table: encoding TEXT DEFAULT 'none'

  • Attachments table: encoding TEXT DEFAULT 'none'

Impact:

  • Inconsistent behavior across different object types

  • Default assumptions may not match actual content

Correction Required:


5. Missing Dialog Type Values

Issue: Database doesn't enforce valid dialog types

IETF Specification (Section 4.3.1):

Current Implementation:

Correction Required:


6. Party UUID vs Data Subject ID

Issue: Mixing of party identification fields

IETF Specification (Section 4.2.12):

Current Implementation:

  • parties table has: data_subject_id TEXT

  • Missing: uuid field from Party Object

Impact:

  • Non-compliant party identification

  • Cannot properly track parties across vCons per spec

Correction Required:


7. Analysis Dialog Reference

Issue: Missing proper dialog reference in analysis table

IETF Specification (Section 4.5.2):

Current Implementation:

  • No dedicated dialog reference field in analysis table

Correction Required:


Additional Recommendations

1. Standardize Parameter Names

The implementation uses both snake_case and camelCase inconsistently. The IETF spec uses snake_case throughout.

Recommendation: Use snake_case for all parameter names to match IETF specification.

2. Add Type System Validation

Recommendation: Implement TypeScript types that exactly match IETF specification:

3. Separate Extension Fields from Core Fields

The implementation mixes vCon extension fields (like data_subject_id, consent tracking) with core vCon fields. These should be clearly separated.

Recommendation:

  • Keep core vCon fields in main tables

  • Create separate extension tables for privacy/consent tracking

  • Document which fields are extensions vs. core spec

Per vcon-dev/vcon-lib, tags are represented as a dedicated attachment rather than a top-level column:

  • Attachment with type="tags", encoding="json"

  • body is an array of strings like "key:value"

Search should derive tag filters by parsing this attachment (e.g., in SQL using jsonb_array_elements_text), or via a vcon_tags_mv materialized view with a GIN index on the aggregated JSONB object for performance.


Implementation Priority

High Priority (Breaking Changes)

  1. Fix schema_versionschema field name

  2. Make vendor field required in analysis

  3. Change body from JSONB to TEXT in analysis table

  4. Add proper uuid field to parties table

Medium Priority (Data Quality)

  1. Remove default values from encoding fields

  2. Add dialog type constraints

  3. Add dialog reference to analysis table

Low Priority (Best Practices)

  1. Standardize naming conventions

  2. Add type system validation

  3. Separate extension fields


Migration Script


Testing Checklist

After applying corrections:


Documentation Updates Required

  1. Update all tool definitions to use corrected field names

  2. Update database schema documentation

  3. Update API documentation

  4. Create vCon compliance checklist

  5. Add migration guide for existing deployments


References

  • IETF vCon Specification: draft-ietf-vcon-vcon-core-02.txt (v0.4.0)

  • Original Implementation: MCP Server for IETF vCon with Supabase - Complete Implementation Specification.md

  • Related: vcon_adapter_guide.md


Questions for Resolution

  1. Should we support both schema and schema_version for backwards compatibility?

  2. How should we handle existing vCons with non-compliant field names?

  3. Should the migration be applied automatically or require manual intervention?

  4. What is the deprecation timeline for non-compliant fields?


Document Version: 1.0 Date: 2025-10-07 Status: Draft for Review

Last updated