Skip to content

Claude/sparql naming conventions analysis#3

Merged
arne-bdt merged 2 commits into
mainfrom
claude/sparql-naming-conventions-analysis-011CUrrzhJqTkmRxYYc4Pevw
Nov 6, 2025
Merged

Claude/sparql naming conventions analysis#3
arne-bdt merged 2 commits into
mainfrom
claude/sparql-naming-conventions-analysis-011CUrrzhJqTkmRxYYc4Pevw

Conversation

@arne-bdt

@arne-bdt arne-bdt commented Nov 6, 2025

Copy link
Copy Markdown
Owner

No description provided.

This analysis addresses naming conventions for datasets, branches, and tags
across the SPARQL Version Control protocol extensions.

Key findings:
- Protocol ABNF allows forward slash (/) in branch names but implementation forbids it
- Current implementation uses ^[A-Za-z0-9._\-]+$ pattern (more restrictive than Git)
- Forward slash breaks semantic routing and creates URL ambiguity
- Recommend keeping current restrictive pattern for security and simplicity

Documents created:
- docs/architecture/naming-conventions-analysis.md (50+ pages)
  Complete analysis covering Apache Jena, Git, Kafka, RFC 3986, security
- protocol/NAMING_CONVENTIONS.md (10+ pages)
  Normative quick reference for implementers and users

Recommendations:
1. Update protocol ABNF to remove forward slash from branch names
2. Add explicit ABNF for dataset and tag names
3. Document URL encoding requirements (RFC 3986)
4. Current implementation is correct - no code changes needed

Analysis covers:
- Current state (implementation vs. protocol mismatch)
- Constraint analysis (Jena, Git, Kafka, RFC 3986)
- Security considerations (path traversal, Unicode attacks, injection)
- URL encoding and semantic routing implications
- Proposed unified pattern for all identifiers
- Migration plan for protocol updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
… tasks

Protocol Updates (Immediate - Complete):
1. Fixed branch ABNF in both protocols (removed `/`, added `.`)
2. Added dataset ABNF (max 249 chars, Kafka compatible)
3. Added tag ABNF (max 255 chars, immutable)
4. Added comprehensive URL encoding sections (§15 Protocol, §P GSP)
5. Expanded security considerations with naming security (§12.2, §L.2)

SPARQL 1.2 Protocol Extension:
- §14: Updated ABNF with all identifier types
- §15: New section on URL encoding and semantic routing
- §12.2: New naming security subsection

SPARQL 1.2 Graph Store Protocol Extension:
- §O: Updated ABNF (shared with Protocol)
- §P: New section on URL encoding
- §L.2: New naming security subsection

Key Protocol Changes:
- Branch pattern: `[A-Za-z0-9._-]` (removed `/` to prevent URL ambiguity)
- Added dataset/tag ABNF (previously missing)
- Documented RFC 3986 unreserved character rationale
- No percent-encoding needed for identifiers

Optional Enhancement Tasks (Future Work):
Created 4 detailed task files under .tasks/naming-conventions/:

1. Reserved Names Tests (01-) - Add edge case test coverage
   Priority: Medium, Time: 1-2h

2. Windows Reserved Names (02-) - Reject CON, PRN, AUX, COM1-9, LPT1-9
   Priority: Low, Time: 2-3h, Creates IdentifierValidator utility

3. Max Length Enforcement (03-) - Add 255-char limit for branches/tags
   Priority: Medium, Time: 1h

4. OpenAPI Documentation (04-) - Update API specs with format details
   Priority: High, Time: 2-3h

Each task includes:
- Clear objective and background
- Step-by-step implementation plan with code examples
- Unit and integration test examples
- Acceptance criteria
- References to specs and analysis docs

Current Implementation Status:
✅ Protocol specifications complete and correct
✅ Core validation already implemented correctly
✅ No breaking changes required
✅ Optional tasks add defensive depth and documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@arne-bdt
arne-bdt merged commit 754ad25 into main Nov 6, 2025
@arne-bdt
arne-bdt deleted the claude/sparql-naming-conventions-analysis-011CUrrzhJqTkmRxYYc4Pevw branch November 6, 2025 16: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.

2 participants