Skip to content

Adding parameters object - #28

Open
durkinza wants to merge 9 commits into
mainfrom
feature/adding-env-and-arg-fields
Open

durkinza wants to merge 9 commits into
mainfrom
feature/adding-env-and-arg-fields

Conversation

@durkinza

Copy link
Copy Markdown
Owner

Adding parameters object to support environment variables and command line arguments.
Updating test files to match new structure.
Minor updates to some fields to move examples from description to examples field.

…ts. Updating tests to match structure.

Moving examples from description to examples field for some fields.
@durkinza

durkinza commented Jan 2, 2026

Copy link
Copy Markdown
Owner Author

The /docs still need updated to reflect the changes from this PR.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new parameters object to support environment variables and command-line arguments in challenge deployments, replacing the previous flagArg string field. The changes enable more flexible and explicit configuration of how dynamic flags and other parameters are passed to challenges.

Key Changes:

  • Introduces a new parameters object structure containing arguments and environmentVariables arrays with flagArgumentName and flagEnvironmentVariableName for referencing flag parameters
  • Updates schema files to use the new parameters object in both container and script deployment options
  • Refactors description metadata to use separate examples fields for better schema documentation

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/challenge-schema/challengeDeployment/argsAndEnvs.ts New file defining the parameters schema with arguments, environment variables, and flag reference validation
src/challenge-schema/challengeDeployment/scriptOptions.ts Replaces flagArg field with new parameters object
src/challenge-schema/challengeDeployment/containerOptions.ts Replaces flagArg field with parameters object and moves examples from descriptions to examples field
tests/examples/cookie-monster/challenge.json Updates test case to use new parameters structure with environment variables
tests/examples/caesar-cipher/challenge.json Updates test case to use new parameters structure with command-line arguments
tests/challenge-bundle.int.test.ts Minor test description update from "Challenge Bundle Schema Validation" to "Challenge Schema Validation"
docs/mkdocs.yml Adds new navigation entry for parameters documentation
docs/docs/examples/index.md Updates examples to demonstrate new parameters structure
docs/docs/ChallengeSchema/ChallengeDeployment/standard-deployment.md Updates documentation examples and restructures required/optional fields table
docs/docs/ChallengeSchema/ChallengeDeployment/parameters.md New comprehensive documentation for parameters, arguments, and environment variables
docs/docs/ChallengeSchema/ChallengeDeployment/index.md Updates examples to use new parameters structure
docs/docs/ChallengeSchema/ChallengeDeployment/hosted-deployment.md Updates hosted deployment example to use new parameters structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/challenge-schema/challengeDeployment/argsAndEnvs.ts Outdated
Comment thread src/challenge-schema/challengeDeployment/argsAndEnvs.ts Outdated
Comment thread docs/docs/ChallengeSchema/ChallengeDeployment/parameters.md Outdated
Comment thread src/challenge-schema/challengeDeployment/argsAndEnvs.ts Outdated
Comment thread src/challenge-schema/challengeDeployment/argsAndEnvs.ts Outdated
Comment thread src/challenge-schema/challengeDeployment/argsAndEnvs.ts Outdated
Comment thread src/challenge-schema/challengeDeployment/argsAndEnvs.ts Outdated
durkinza and others added 3 commits January 4, 2026 14:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/challenge-schema/challengeDeployment/argsAndEnvs.ts Outdated
Comment thread src/challenge-schema/challengeDeployment/argsAndEnvs.ts Outdated
Comment thread src/challenge-schema/challengeDeployment/scriptOptions.ts Outdated
…t and flagEnvironmentVariables at the same time.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/challenge-bundle.int.test.ts
Comment thread tests/bad-examples/missing-flag-options/missing-flag-arg.json Outdated
Comment thread tests/challenge-bundle.int.test.ts
Comment thread tests/bad-examples/missing-flag-options/missing-flag-env.json Outdated
Comment thread tests/bad-examples/missing-flag-options/missing-flag-arg.json Outdated
Comment thread tests/examples/caesar-cipher/challenge.json Outdated
Comment thread tests/bad-examples/missing-flag-options/missing-flag-env.json Outdated
Comment thread tests/examples/caesar-cipher/challenge.json Outdated
Comment thread docs/docs/ChallengeSchema/ChallengeDeployment/index.md

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

tests/bad-examples/missing-flag-options/bad-default-flag-type.json:4

  • The word "Seasame" is misspelled. It should be "Sesame" (as in "Sesame Street").

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@durkinza
durkinza requested review from P-Tasty and purvesta January 5, 2026 00:06
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