ProtoDef-io / ProtoDef-io/node-protodef-validator

Add protocol mapper sanity check to protodef-validator

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1
Forks
4
Avg merge
2m
Merged PRs (30d)
2

Description

Protocol switches could reference values absent from their preceding mapper, causing undefined dispatch behavior

There should be sanity check to ensure switches happen on enum values that are defined, if the interpreter/compiler knows what the possible enumerated values are (custom datatypes may not make this information available for sanity check)

Related

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the protocol-switch validation logic and the tests for mapper and custom datatype handling. Add a sanity check for switch values when the preceding mapper's possible enum values are known, while preserving validation for custom datatypes where those values are unavailable; done means invalid references are reported and valid or unknowable cases continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.