bug: spec with no top-level action panics with index out of range
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- testing-qa
Research direction
Start with modelchecker/processor.go, especially Processor.InitializeNode around line 1501, and inspect how it handles files with no top-level actions. Reproduce the panic with the Server spec in the issue, then check the cases with actions only inside a role and with only an assertion. Done when these cases no longer panic and the model checker reports a usable result or error.
Written by the indexing model from the issue text.
Description
fizzbee 0.5.4 from the tap, macos 26, arm64.
a spec with no top-level action crashes the model checker with a go panic.
repro, servers.fizz:
role Server:
pass
$ fizz servers.fizz
Model checking servers.json
configFileName: fizz.yaml
fizz.yaml not found. Using default options
StateSpaceOptions: options:{max_actions:100 max_concurrent_actions:2}
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/fizzbee-io/fizzbee/modelchecker.(*Processor).InitializeNode(0x7cdd772c0000)
modelchecker/processor.go:1501 +0x6d0
github.com/fizzbee-io/fizzbee/modelchecker.(*Processor).Start(0x7cdd772c0000)
modelchecker/processor.go:1542 +0x50
...
same panic when the only actions are inside a role, and when the file holds only an assertion. with a top-level action Init added the checker runs.
processor.go:1501 is if p.Files[0].Actions[0].Name != "Init" {. the same line is on main at processor.go:1775 (e1287d36c). not tried on a build of main.
- Dominant language
- Go
- Stars
- 361
- Forks
- 24
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 62
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fizzbee-io/fizzbee
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
fizzbee-io/fizzbee#478 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
fizzbee-io/fizzbee#228 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
fizzbee-io/fizzbee#441 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
fizzbee-io/fizzbee#438 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
fizzbee-io/fizzbee#432 ·
Maintainers usually reply within 1 day
All issues in fizzbee-io/fizzbee
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
security
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Area/DeveloperPortal Aspect/UI Severity/Minor Type/Bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
wso2/api-platform#4369 ·
Maintainers usually reply within 1 day