tracking: verify unverified claims at runtime (and how to test)

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active

Research direction

Start with docs/rule-priority.md, docs/adr/0005-guessing-rules-are-in-no-preset.md, and the claims listed in this issue; search src/rules for "not been checked", "not confirmed" and "LOW CONFIDENCE" to find related claims. Verify each claim using the browser console, script debugger, or a deployed Suitelet as appropriate, recording account type, version, date, script, and exact output. Done means the findings are written to docs/runtime-verification.md and linked from the relevant rules.

Written by the indexing model from the issue text.

Description

documentation ready-for-human

Why

Many claims in this repo rest on Oracle's agent skills, Oracle's documentation or the community type definitions, and those sources contradict each other and sometimes the platform. Some claims were never run. Runtime behavior is the ground truth: when a source says something that does not work, the runtime wins. This issue tracks every claim we are unsure of, and records how to test one.

Findings land in docs/verification/: one page per verification in results/ (the method, the account type and version, the script, the results and the decision) and the contradictions in contradictions.md. Rules cite them the way they cite an ADR. Run a test with npm run verify:run where a probe can (see docs/verification/README.md).

How to test

Which method to use depends on where the code runs. Always record the account type (sandbox or production) and the version (for example 2026.2).

Client scripts: browser console
  1. Log in and open any record page.
  2. Open the browser developer tools console.
  3. Load modules with require and run the checks:
require(['N/util'], function (u) {
  console.log(JSON.stringify({ isArray: u.isArray([]), nanoTime: typeof u.nanoTime }));
});

This runs in the browser's JavaScript engine, not the server's GraalJS, so it says nothing about server-only behavior (for example typeof performance differs between them).

Server scripts, quick: script debugger

Customization > Scripting > Script Debugger. Paste a script, run it, and print results with console.log or the debugger's output. It runs on the server. Some things behave differently here than in a deployed script (for example util.nanoTime throws in the debugger with Cannot read property 'nsNanoTime' of undefined), so confirm a surprising result with a deployed script.

Server scripts, authoritative: deployed Suitelet

Upload a script file to the File Cabinet, create a Script record and a Deployment (status Testing, audience yourself), and open the deployment URL. A minimal template:

/**
 * @NApiVersion 2.1
 * @NScriptType Suitelet
 */
define([], () => ({
  onRequest({ response }) {
    const r = {};
    const t = (k, f) => { try { r[k] = f(); } catch (e) { r[k] = 'THROWS: ' + e.name + ': ' + e.message; } };
    t('example', () => typeof util.isArray);
    response.write(JSON.stringify(r, null, 1));
  },
}));

Other script types (Map/Reduce, Scheduled, User Event, RESTlet) can differ from a Suitelet. Test the script type a rule targets.

Reporting

Paste the exact output (including error messages, which are often the evidence) as a comment on the matching issue, with the account version, the date, and the script you ran.

What is unverified

  • #67 util.nanoTime in a deployed server script, and the N/util type definitions (isAsyncFunction missing, nanoTime absent on the client)
  • #68 log and util are globals in every script type, and shadowing them
  • #69 SAFE guide failure claims: module-scope N/ calls (noModuleScopeApiCalls), SuiteQL abbreviation in search.create (noSuiteQLTypeInSearch)
  • #70 serverWidget type definitions vs Oracle pages (requireServerWidgetOptions, noUnsupportedServerWidgetFieldType)
  • #71 Oracle documentation mistakes named in docs/rule-priority.md (https default Content-Type, createSecretKey, sendRedirect)
  • #41 crypto.HashAlg member names (noWeakHash)
  • #39 whether a Suitelet may set Set-Cookie (noInsecureCookie)
  • #73 the global toString() as a replacement for instanceof on SuiteScript objects

Already verified (browser console and script debugger, sandbox 2026.2, 2026-11-04), from #46:

  • util.isString, isNumber and isBoolean accept boxed values; isNumber(NaN) is true; isDate accepts an invalid Date; isFunction is true for async functions; isAsyncFunction works.
  • util.isObject is true only for plain objects: false for arrays, Date, functions, class instances and null; it throws for Object.create(null).
  • util.extend matches Object.assign: own enumerable properties, shallow, returns the receiver, accepts a null contributor.
  • util.each iterates arrays (3 callback arguments) and own keys of plain objects ((value, key)), iterates a string, does not iterate a Set or Map, has no early exit (returning false does not stop it), and returns the original collection.
  • typeof performance is object on the client and undefined in the debugger; typeof process is undefined in both.

Not yet written up

Claims in the rule comments that carry a "LOW CONFIDENCE" or "not confirmed" note and still need a runtime check should get their own issue as they come up. Search src/rules for "not been checked", "not confirmed" and "LOW CONFIDENCE". Anything that looks like a mistake in a skill (the skills contradict each other, for example on N/log) belongs here too.

Where

  • docs/rule-priority.md (source tiers and conflicts)
  • docs/adr/0005-guessing-rules-are-in-no-preset.md
Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
2h 8m
Merged PRs (30d)
64

Getting set up

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.

More from nemchik/biome-plugin-suitescript

All issues in nemchik/biome-plugin-suitescript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.