Vai al contenuto
Menu

Check code and keep it

Code that is tested, kept and run by ID.

Send a Python function and its tests to Duplex’s isolated execution service, read exactly which tests passed, keep the function as a versioned skill and run it on fresh inputs. When a result is wrong, Duplex helps pin down why.

.md

Check a function against its tests.

Give the Python function and tests that state the expected results, and ask your AI to verify them in Duplex’s isolated execution service. When the material and permissions are there, the start of the turn can even offer a ready check. A favourable comment from an agent after reading the code is not an execution.

EsitoWhat it means
Tests passedThis version produced the expected results on the listed inputs. Read its certificate and compare the tested conditions with your use.
An expectation differedIt ran and at least one result missed. Ask for the input, actual output and expected value side by side.
Execution errorIt raised an error before returning. Check input names, types and dependencies.
Refused or unavailableIt never ran, so the outcome is unknown. Read whether access, setup, allowance or redaction stopped it.

A test whose expected value was copied from the function’s own output proves little. Take the expected answer from your source. A failing input can join the next version’s tests.

Run a kept function by its ID.

A function that relies on another kept function can declare that dependency in its check, so both are exercised together and the certificate names the earlier function. If that function later changes, the recorded dependency tells you what to revisit.

LeggiWhy
ID and purposeTwo similar skills can have different histories. The ID picks the right one.
Bound inputsThe names your values were given under. Differences show here.
Output of this runThe value or error from this run. The certificate describes the verified function; this record is today’s result.

Versions and value.

Versions for the same purpose stay together. Find a skill by purpose and read which version is offered, what it replaced, its use and why it was chosen. An earlier version can still be called by ID while it runs; keep the version ID you used in a study.

If a module has several functions, name the entry function and that’s the one kept. Otherwise Duplex picks from the functions the tests exercise and the module’s external entry, and the card says which it chose and why.

When a version struggles on certain inputs, another version for the same purpose can be tried on those same inputs, and its results there support a change in the offer. The card shows verification time, actual runs, builds answered without new verification and sessions that used it.

Fetch a function as a file.

The card shows the length and checksum of the kept text. A long function comes in parts: fetch them from one version, in order, and if the length and checksum match the card, the text arrived intact. A client with local file access can use the offered file-apply action. If you change the local copy, it’s a new version: run the tests again.

When a skill returns the wrong result.

Run a kept Python skill with the known correct result as the expected value, sent separately from the inputs, or with a kept checker that returns true, false or no judgment. The run then answers the question that matters: did this version, on this input, meet this criterion?

A contradiction can start a background investigation of that version, comparing the failing input with a known working one. If no working case is recorded, the answer asks for one with a trusted value.

FindingHow to read it
provedA single condition or a combination was found. Read the values tested and the inputs held fixed.
openThe failure didn’t repeat, the working case stopped working, or results varied. Not a basis for a restriction.
undecidedA combination may be invalid, conditions may cancel out, or an expected value is absent. Fill in only answers you can establish.

Who can restrict a version.

A finding alone never blocks execution. A steward with skill-limiting authority, or an administrator, can choose a proved diagnosis and restrict the affected version at exactly the inputs shown wrong. If another version was judged correct there, the refused request can name it. An authorized person can lift the restriction.

NumPy, pandas and SciPy for your team.

The prepared scientific profile includes NumPy, pandas and SciPy. Being in the profile and being allowed to run for your team are separate: when your AI hits a missing grant, it follows the returned action to request one, naming the package, version, source, environment and team.

The requester can’t approve their own request. The person the organization owner designates approves or denies it, with its duration and scope in view, on the Python libraries screen. A different team can’t use the grant, even with the skill ID. A denied request runs nothing.

The package environment runs without network access or a cloud identity, so any data must arrive as an authorized input. When a grant expires or is revoked, new runs stop; the card and earlier evidence stay readable. A new package version is a new environment: run the check again.

For a report, keep four things together: the function revision, the package and environment versions, the data revision and the execution receipt.

Prompt per questa pagina

Tutti i prompt →

Copiane uno, completa le parti tra parentesi angolari e dallo alla tua IA.

Chiedi alla tua IAVerify this function
Verify this Python function in Duplex's isolated execution service with the tests below. Expected values come from <source>, not from the function. Report each test as passed, failed (input, actual, expected) or error, and give me the certificate ID if it passes and is kept.

<function>

<tests>

Where to find more in the MatterSpace Duplex docs:
- Check code and keep it, this topic in full: https://www.matterspace.ai/duplex/docs/verified-code.md
- Every prompt, and where to paste the standing ones: https://www.matterspace.ai/duplex/docs/prompts.md
- Exact tools, operations, settings and answers: https://www.matterspace.ai/duplex/docs/reference.md
- Errors and what to do about them: https://www.matterspace.ai/duplex/docs/troubleshooting.md
- Every docs page, with what it covers: https://www.matterspace.ai/duplex/docs/llms.txt
Chiedi alla tua IAThis result is wrong: find out why
Skill <skill ID> returned <observed> for <inputs>; the correct answer is <expected> (source: <source>). Run it again with that expected value, and if Duplex opens an investigation, tell me the finding (proved, open or undecided) and which conditions were tested.

Where to find more in the MatterSpace Duplex docs:
- Check code and keep it, this topic in full: https://www.matterspace.ai/duplex/docs/verified-code.md
- Every prompt, and where to paste the standing ones: https://www.matterspace.ai/duplex/docs/prompts.md
- Exact tools, operations, settings and answers: https://www.matterspace.ai/duplex/docs/reference.md
- Errors and what to do about them: https://www.matterspace.ai/duplex/docs/troubleshooting.md
- Every docs page, with what it covers: https://www.matterspace.ai/duplex/docs/llms.txt
Chiedi alla tua IAI need NumPy, pandas or SciPy
This function needs <package> <version>. Check whether my team has a grant in Duplex. If not, file the request through the returned action with the package, version, environment and team, and tell me who has to approve it.

Where to find more in the MatterSpace Duplex docs:
- Check code and keep it, this topic in full: https://www.matterspace.ai/duplex/docs/verified-code.md
- Every prompt, and where to paste the standing ones: https://www.matterspace.ai/duplex/docs/prompts.md
- Exact tools, operations, settings and answers: https://www.matterspace.ai/duplex/docs/reference.md
- Errors and what to do about them: https://www.matterspace.ai/duplex/docs/troubleshooting.md
- Every docs page, with what it covers: https://www.matterspace.ai/duplex/docs/llms.txt
Chiedi alla tua IAWhich version is in use?
For the Duplex skill with purpose "<purpose>", list its versions: which one is offered now, what it replaced, how each originated, its runs, and why the current one was chosen.

Where to find more in the MatterSpace Duplex docs:
- Check code and keep it, this topic in full: https://www.matterspace.ai/duplex/docs/verified-code.md
- Every prompt, and where to paste the standing ones: https://www.matterspace.ai/duplex/docs/prompts.md
- Exact tools, operations, settings and answers: https://www.matterspace.ai/duplex/docs/reference.md
- Errors and what to do about them: https://www.matterspace.ai/duplex/docs/troubleshooting.md
- Every docs page, with what it covers: https://www.matterspace.ai/duplex/docs/llms.txt