docs: help/README catch up with v3.8.0; keyset-number wording; RU "пресет"

Documentation:
- help (§1/§3): the SCP80 tab is switched by three pills - the tab list and the
  section intro now name the TAR probe (RU "TAR-сканер"); §3.1/§3.2 describe the
  Keyset selector next to the preset selector (and that a successful PoR
  advances the counter only when SPI1 carries a counter check); §4 describes
  the keyset editor rows, the derived number and the per-keyset counters; the
  probe section keeps its counter rule.
- README/README_RUS: the SCP80 tab says three pills and gains a "TAR probe" /
  "TAR-сканер" section (standard list, verdicts, counter persistence); the
  Cards section is rewritten for the server-side store - keysets, server-owned
  per-keyset counters with the audit trail, JSON export/import as the migration
  path, the keyset editor, the equipped-card mismatch banner - and the field
  table, "Add a card" and "Edit / remove" follow.

Terminology:
- "key version" is no longer used for SCP80 keysets in the UI, the server error
  strings and the docs: the selector is "Keyset", its options "Keyset 1 - ...",
  the messages say "keyset N ...".  The TS 102 225 A.1/A.2 quotes and the GP
  PUT KEY P1 field keep the spec's own wording.
- RU keeps the word "keyset" untranslated ('Добавить keyset', 'Номер keyset',
  "не является keyset пресета", ...) and uses "пресет" instead of
  "предустановка" throughout the dictionary, the help and README_RUS.

sw cache simple-v340.  Tests: 742 Node / 619 Python.
This commit is contained in:
2026-09-30 23:48:32 +03:00
parent 31715ba58a
commit 9f7876b5fa
13 changed files with 207 additions and 180 deletions
+9 -9
View File
@@ -38,13 +38,13 @@ const PRESET = {
],
};
test('spKeysetKvnOf reads the key version from the high nibble', () => {
test('spKeysetKvnOf reads the keyset number from the high nibble', () => {
assert.strictEqual(spKeysetKvnOf('15'), 1);
assert.strictEqual(spKeysetKvnOf('29'), 2);
assert.strictEqual(spKeysetKvnOf('3A'), 3);
assert.strictEqual(spKeysetKvnOf('05'), 0);
assert.strictEqual(spKeysetKvnOf('ff'), 15);
// not a byte: no key version
// not a byte: no keyset number
assert.strictEqual(spKeysetKvnOf(''), null);
assert.strictEqual(spKeysetKvnOf('5'), null);
assert.strictEqual(spKeysetKvnOf('ZZ'), null);
@@ -60,15 +60,15 @@ test('spKeysetList converts a v3.8.0 flat preset into one keyset', () => {
assert.deepStrictEqual(spKeysetList({}), []);
});
test('spKeysetFor finds a keyset by key version', () => {
test('spKeysetFor finds a keyset by number', () => {
assert.strictEqual(spKeysetFor(PRESET, 1).cntr, '0000000001');
assert.strictEqual(spKeysetFor(PRESET, 2).cntr, '0000000005');
assert.strictEqual(spKeysetFor(PRESET, 3), null);
assert.strictEqual(spKeysetFor(null, 1), null);
});
test('spKeysetCheck enforces the key-version rules', () => {
// a defined key version passes
test('spKeysetCheck enforces the keyset-number rules', () => {
// a defined keyset number passes
assert.strictEqual(spKeysetCheck(PRESET, '15', '15'), '');
assert.strictEqual(spKeysetCheck(PRESET, '29', '29'), '');
// '00'/'00' means no security: no keyset needed (TS 102 225 A.2)
@@ -76,8 +76,8 @@ test('spKeysetCheck enforces the key-version rules', () => {
// ... and one zero byte with a defined version passes too
assert.strictEqual(spKeysetCheck(PRESET, '15', '00'), '');
// KIc/KID versions must agree when both are non-zero (A.2)
assert.match(spKeysetCheck(PRESET, '15', '25'), /same key version/);
// the key version must be defined in the preset
assert.match(spKeysetCheck(PRESET, '15', '25'), /same keyset number/);
// the keyset number must be defined in the preset
assert.match(spKeysetCheck(PRESET, '35', '35'), /3 .*not defined/);
// one zero byte: the other byte's version applies (keyset 2 is defined)
assert.strictEqual(spKeysetCheck(PRESET, '00', '25'), '');
@@ -90,7 +90,7 @@ test('spKeysetCheck enforces the key-version rules', () => {
assert.match(spKeysetCheck(PRESET, '15', 'ZZ'), /KID/);
});
test('spKeysetOptionsHtml lists the keysets and marks an undefined version', () => {
test('spKeysetOptionsHtml lists the keysets and marks an undefined number', () => {
const html1 = spKeysetOptionsHtml(PRESET, '15', '15');
assert.match(html1, /value="1" selected/);
assert.match(html1, /value="2"/);
@@ -102,7 +102,7 @@ test('spKeysetOptionsHtml lists the keysets and marks an undefined version', ()
// a preset without keysets: the form's version shows as undefined
const html3 = spKeysetOptionsHtml({ keysets: [] }, '15', '15');
assert.match(html3, /not defined in the preset/);
// no key version in the form and no keysets at all
// no keyset number in the form and no keysets at all
assert.match(spKeysetOptionsHtml({}, '', ''), /no keyset/);
});