GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(mcpx): refresh inventory and add bounded fuzz smoke by dezren39 · Pull Request #5127 · developing-today/code

test(mcpx): refresh inventory and add bounded fuzz smoke #5127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
dezren39 merged 2 commits into main from queue/8147-1960-mcpx-fuzz-policy
Nov 11, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

test(mcpx): refresh inventory and add bounded fuzz smoke #5127

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2 commits
Select commit Hold shift + click to select a range
31aef31
test(mcpx): add bounded fuzz smoke and policy
Nov 3, 2026
cb7cb68
fix(mcpx): register fuzz policy and public-client docs in compendium …
Nov 11, 2026
File filter
Filter by extension


Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

3 changes: 3 additions & 0 deletions 3 .github/workflows/mcpx-test.yml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ jobs:
echo "unit packages:"; echo "$pkgs"
# shellcheck disable=SC2086
go test $pkgs -count=1
- name: Bounded fuzz smoke (FuzzStripJSONC)
working-directory: pkgs/mcpx
run: go test ./internal/config -run '^$' -fuzz '^FuzzStripJSONC$' -fuzztime=5s -parallel=1

lint:
name: "basic: mcpx-test lint"
Expand Down
14 changes: 14 additions & 0 deletions 14 pkgs/mcpx/docs/compendium.manifest.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,20 @@
"lines": 123,
"note": "the per-package test inventory the policy page points at (#1960 deliverable 1); was merged without a manifest entry, which this PR repairs"
},
{
"path": "docs/testing/fuzz-and-seed-policy.md",
"chapter": "maintaining-these-docs",
"role": "chapter-source",
"lines": 70,
"note": "the fuzz and seed policy for #1960: bounded FuzzStripJSONC PR smoke vs the separate soak work; registered per the Codex P1 finding on PR #5127"
},
{
"path": "docs/public-client.md",
"chapter": "protocol",
"role": "chapter-source",
"lines": 23,
"note": "the public Go client for the /v1 API (#1877 rung 1, PR #8277): calls derived at run time from internal/api.Ops so the client cannot drift from the daemon; was merged without a manifest entry, registered here"
},
{
"path": "docs/testing/feature-inventory.md",
"chapter": "maintaining-these-docs",
Expand Down
70 changes: 70 additions & 0 deletions 70 pkgs/mcpx/docs/testing/fuzz-and-seed-policy.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# mcpx fuzz and seed policy (#1960)
Comment thread
dezren39 marked this conversation as resolved.
Resolved

Uh oh!

There was an error while loading. Please reload this page.


This is the working policy for deterministic generated tests and Go's native
fuzzing. The two systems complement one another; they do not share a random
stream.

## Seeded generated tests

- Test data generated from randomness must use `internal/testsupport/gen` and
one explicit run seed. Do not use package-global `math/rand`, `time.Now()`
as a seed, or `crypto/rand` to create test inputs. When production code uses
randomness, prefer injecting a source so tests can control it.
- Derive a test's source with `gen.ForTest(t, runSeed, generatorName,
generatorVersion)` (or `gen.Stream` when a test name is supplied explicitly).
A stream is keyed by the run seed, test name and generator `name@version`;
adding another test or changing one generator must not shift unrelated
streams.
- Generators draw only through `gen.Source` (`Uint64`). Use the range and byte
helpers in `gen`; do not depend on the output sequence of `math/rand` or
consume hidden draws for bookkeeping such as input length.
- Do not hard-code a normal run seed. Fixed seeds belong only in golden tests
that pin the derivation contract. A generator output change requires a
generator-version bump and a corresponding manifest update.
- A failing generated test must print enough context to replay it: the run
seed, test name, generator name/version and failing case. Preserve a useful
failure as a regression test; do not rerun until it happens to pass and drop
the original seed.

The CI run-seed store at `testdata/seeds/v1` records run metadata collected
from `test-seed` artifacts. It is not the native fuzz corpus; the collector
workflow is its only writer. Do not hand-edit seed records.

## Native Go fuzz targets

- A fuzz target accepts arbitrary inputs and checks stable invariants. Keep it
deterministic for the same input, bounded in memory and CPU, and independent
of network services, wall-clock time and shared mutable state.
- Add a small set of representative `f.Add` inputs. Go replays these seeds
during ordinary `go test`; ordinary tests do not perform mutation. Preserve
minimized failures in `testdata/fuzz/<FuzzName>/` so the regression runs on
every normal test invocation.
- When adapting `[]byte` to a generated structure, use
`gen.NewBytesSource(data)`. Derive payload size from `len(data)` rather than
consuming bytes to choose a size; this keeps the complete fuzz input
available to the target.
- A fuzz failure is a bug report: keep the reproducer, add or strengthen the
invariant/regression test, and record which generator or input shape could
have found it. Do not silently discard a failing corpus entry.
- Native fuzzing uses Go's own mutation engine and does **not** consume the
run-wide `gen` seed. Its minimized corpus is separate from `testdata/seeds`.

## Commands and CI boundary

Replay all saved corpus entries with the normal package tests:

```sh
cd pkgs/mcpx
go test ./...
```

Run the bounded PR smoke for the current proof target:

```sh
cd pkgs/mcpx
go test ./internal/config -run '^$' -fuzz '^FuzzStripJSONC$' -fuzztime=5s -parallel=1
```

The `mcpx-test` workflow runs this short smoke after the regular unit tests.
Long fuzz campaigns and soak policy remain with the separate fuzz-soak work
(#1985); do not turn the PR job into an unbounded run.
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.