Appearance
Positive model
Symptoms of the positive model: learning from traffic, suggestions, approval and rejection, enforcement with pos.* events, violations and the impact preview. Some entries at the end concern the developer acceptance tests and the source checkout.
Learning shows no samples
- Cause:
positive.enabledorlearning.enabledis off; requests are flagged by another module (including detect mode); the upstream answers 4xx or 5xx or never answers; or sampling admits too few requests. - Check: the Learning settings and status, or
waap learning get -app shopandwaap learning status -app shop. The resultsflagged,statusandratecount exclusions on this answering node since start. Wait one 10-second flush for observations to appear. - Fix: enable both flags, send representative clean traffic from many clients, and check upstream health. Review findings rather than disabling protections. Check
learning.sample_rate(default 100 requests/s per node); raise it within its displayed bounds only if sampling is too low for the workload.
Results show endpoint_limit or client_share
- Cause:
endpoint_limitmeans the node has reached 2,000 endpoints for this application.client_sharemeans a client has contributed its share of an endpoint's samples (5% over one hour, with a floor of two). - Check: the status endpoint counts and this node's results. A single scripted client often reaches its share immediately. Folding runs on the control plane and does not reduce the node's literal observation count before folded rules exist.
- Fix: use representative traffic from many clients, and inspect paths for unwanted endpoint growth. Reset only if the observations should be discarded; it deletes them on every node. Do not lower the evidence thresholds just to get a ready-looking progress bar.
Observations are missing after failover
- Cause: observations flush every 10 seconds, so a failover can lose at most one flush interval. This node's result counters are local, so they can differ after failover.
- Check: compare daily samples and last seen on Learning, and the HA replication state.
- Fix: allow clean traffic and another flush. If older observations are missing too, inspect replication health. Resetting does not recover lost observations.
Learning status says "this process stores no learning observations"
- Cause: the answering process has no observation store configured.
- Check: the control-plane process, its data directory, and which node the CLI's
-runtime-dirselects. - Fix: use the running control plane that stores observations, and check its startup logs.
The model lags the status card, or Refresh model shows the same build
- Cause: observations flush every 10 seconds, while the derived model is cached for up to one minute. Status observation totals can be newer than the model-derived endpoint counts and readiness. The page requests the model once a minute.
- Check: compare Built in the URL tree (or the CLI model header) with the status last seen and daily samples. Repeated refreshes inside the cache interval return the same model.
- Fix: wait one minute and use Refresh model. A learning threshold change or a reset invalidates the cached model. Do not reset just to refresh it.
Short learning acceptance runs keep showing an older model
- Cause: observations flush every 10 seconds, and a model read before the second batch flushes can cache the incomplete model for another minute.
- Check: compare the model's build time and the endpoint's first and last observations with the two traffic batches. Status reads also build the cached model.
- Fix: in the acceptance harness, leave a complete flush interval after the second batch before the first model or suggestion read. Use two batches a minute apart with distinct clients. Do not reset observations or alter backend timers to speed it up.
An endpoint stays learning
- Cause: the endpoint has not met its sample, client or duration threshold, or its confidence is below
learning.min_confidencebecause its structure is still changing. - Check: select its method in the URL tree, or run
waap learning model -app shop -endpoint 'GET /products/{var}'. Read the limiting factor, the four factor bars and the evidence. Application totals are not endpoint readiness. - Fix: collect representative clean traffic over the required time, from many clients. Check stability once the other thresholds are met. Do not lower thresholds just to mark the endpoint ready. Ready endpoints still need rule review.
Too many or too few URL segments fold into {var}
- Cause: folding combines literal segments at a prefix only when their distinct count is greater than
learning.fold_threshold(default 20). It learns across methods; existing variables and trailing empty segments are excluded. Common ID normalization happens first. - Check: the tree's fold value count, the CLI model's fold list, and the current threshold in Learning settings. Compare the original routes with the folded prefix.
- Fix: raise the threshold to combine fewer literal segments, or lower it to combine more. Preview and apply the setting, then inspect the resulting model. For distinct application routes that should not fold, raise the threshold above their count. Manual split and fold rules are not part of this browser, which is read only.
Stability falls after an application release
- Cause: new significant parameters or content types appeared in the latest quarter of samples and were absent from the older observations.
- Check: endpoint confidence evidence, content types and parameters. A single day means stability was not measured; data is grouped by UTC day.
- Fix: verify the new structure belongs to the release and let representative traffic accumulate. Leave protections enabled. Reset only when the entire saved training set should be discarded, because it deletes observations on every node.
Endpoint detail says no such endpoint in the model
- Cause: the endpoint is absent from the current model, for example after a reset, a changed fold threshold, or new folds in a later build.
- Check: refresh the URL tree or run
waap learning model -app shop. The-endpointselector must match the method and template exactly. A malformed selector reports-endpoint must be 'METHOD /template'. - Fix: select a method from the refreshed tree, or copy its method and template into the quoted
-endpointargument.
CLI output shows \u001b or \x.. inside a path or parameter name
- Cause: a client sent control characters, bidirectional controls or invalid UTF-8 in a path, parameter name, enum, content type or evidence. The CLI escapes them so they cannot change the terminal; the stored value is unchanged.
- Check:
waap learning model -app shop -json(or the web UI) shows the raw value.waap events list -app shopshows whether the same client sent attacks. - Fix: none needed for the CLI. An unwanted endpoint stays out of learned rules until approved. Reset learning if junk endpoints crowd the model.
A parameter is suggested by name only
- Cause: fewer than a fifth of
learning.min_samplesparameter values (200 by default) were seen, or confidence is below the threshold. A changed profile caps parameter confidence at 50%. - Check: select the endpoint in Learning, or run
waap learning model -app shop -endpoint 'GET /products/{var}'. Read its parameter values,changedmark, profile and evidence. Compare withwaap learning suggestions -app shop -endpoint 'GET /products/{var}'. - Fix: collect representative clean traffic across clients and time. Let a changed profile settle. Name-only parameters remain known; they propose no value constraint.
A value many requests carry is not in the profile, or a parameter stays name-only
- Cause: too few distinct clients sent it. A type mismatch, length, character class or enum value needs at least
learning.min_clients(at most 32, estimated) distinct clients to widen a profile, and a parameter needs as many senders to be profiled. This stops a few clients from teaching the model. It also applies to a real value that only a few users send, such as an admin-only option or a rare sort order. - Check:
waap learning model -app shop -endpoint 'GET /catalog/items/{id}'and the parameter's clients. Events for the value showpos.param.*withunconfirmed(logged, not refused, while confirmation is on). - Fix: if the value is legitimate, let more clients use it, or edit the suggestion before approval (or the rule afterwards) to allow it. Do not lower
learning.min_clientsbelow the number of clients you trust to define normal traffic.
A parameter type is text though most values are numbers
- Cause: more than 0.1% of non-empty values do not fit a narrower numeric type. Empty values affect length only and do not widen the type.
- Check: compare the compatible type counts and non-empty values in the endpoint detail.
- Fix: check the application and representative input. Allow legitimate text traffic; do not lower protection or exclude valid values just to obtain a numeric profile.
An enum is missing from a profile
- Cause: more than 32 distinct values (or values over 64 bytes) were sent by at least
learning.min_clientsclients. Other causes: values beyond 32 from a few clients do not count, too few repeats (each value needs ten observations on average), new values in the latest 25% of samples, or a sensitive parameter. New enum values drop the enum while keeping the type and lengths. - Check: read the distinct and value counts, the sensitive marks and the current profile.
- Fix: allow learning to settle if the set is finite. For open sets or sensitive fields, use the shape profile; an enum is not suitable.
An enum holds only one or two of the values clients really send
- Symptom: a parameter with a small value set (for example a quantity from 1 to 5) is suggested as an enum of one value. The other values would be refused with confirmation off, or logged as unconfirmed.
- Cause: before 2026-11-05, each enum value that fewer than
learning.min_clientsclients sent was dropped on its own. With few clients overall (25 clients, threshold 20), only the value that crossed the line stayed. - Check:
waap learning suggestions -app NAME -endpoint 'METHOD /template', and compare the enum with the parameter's values inwaap learning model -endpoint .... - Fix: update. Values each sent by few clients now count as outliers only while few clients sent them all; spread over many clients, they are all in the enum. Reject an already suggested narrow enum, or edit it before approving.
A long value is refused by pos.param.pattern, .type or .enum
- Cause: only the first 4 KiB of a value are examined. A longer value has no type, is not an enum value, and cannot be shown to match a pattern.
- Fix: if such values are normal, remove the type, enum or pattern from that parameter's rule and keep a length bound, or add an exception for the parameter.
An endpoint never gets a suggestion
- Cause: it has not met the sample, distinct-client or duration thresholds, its confidence is low, or ready endpoints exceeded the suggestion limit.
- Check: the URL tree's limiting factor and confidence evidence, or
waap learning model -app shop -endpoint 'GET /products/{var}'. Check suggestion overflow separately from endpoints still learning. - Fix: collect representative clean traffic and let changing profiles settle. Review settings and unwanted endpoints if the bounded capacity is exhausted. A refresh can return the same model for up to a minute. No rule is installed automatically.
A rejected suggestion came back as new
- Cause: the current profile no longer fits the rejected rule: a type, required flag or enum changed, lengths exceed their margins, new characters appeared, or an endpoint gained a content type or a profiled or required parameter. A reset does not erase rejection decisions.
- Check: read the current profile and evidence, and inspect the stale-rejection count.
- Fix: review the application's change. Reject the new profile if it is still unwanted, or restore the saved rejection ID to discard the old decision explicitly.
Suggestion actions return 403 or report this process stores no rejected suggestions
- Cause: the account lacks the operator role (403), or the answering process has no rejection store (503).
- Check: the account's role, and the management listener or CLI runtime directory.
- Fix: use an operator account against the control plane with its configured store. Viewers can read suggestions but see no Reject or Restore buttons.
Reject says has no profile to reject yet (422)
- Cause: a name-only parameter has no sufficiently confident value profile. Unknown IDs also return 422 (
no suggestion). - Check: refresh the suggestions and compare the ID, the
profiledfield and the evidence. - Fix: wait for a stable profile with enough values. Reject a whole endpoint if that is the decision intended. The UI disables rejection of a name-only parameter.
Reject says the most kept: restore some first
- Cause: the application already keeps the maximum of 5,000 rejection decisions, including stale ones. A learning reset retains them.
- Check: the stale rejections in the queue, or
waap learning suggestions -app shop. - Fix: remove unwanted decisions with
waap learning restore -app shop -id ID, using saved IDs, then retry. Save the IDs from the list, detail or JSON output before observations disappear.
Restore says none of these suggestions is rejected (404)
- Cause: none of the requested IDs has a saved rejection for this application.
- Check: verify the application and IDs from current or saved suggestion output.
- Fix: refresh the list. You can restore a saved rejected ID even if its suggestion is absent. A new suggestion needs no restore.
Approve says has a manual rule or is covered by the manual rule ... (422)
- Cause: a manual rule in
positive.rulesmatches the endpoint, exactly or as a wider template (GET /{x}coversGET /items). Learning never changes or shadows manual rules. - Check:
waap rules get -app shop -list positive_rules. The suggestion's status ismanual. - Fix: edit the manual rule, or remove it and approve the suggestion.
Approve says is rejected; restore it first (422)
- Cause: the endpoint or parameter is a remembered rejection.
- Fix: restore it with
waap learning restore -app shop -id ID, then approve.
Approve says nothing to approve (422)
- Cause:
allfound nonewsuggestion (everything is approved, rejected or manual), or the request named no IDs and no edited rules. - Check: the suggestion statuses on Learning, or
waap learning suggestions -app shop. - Fix: name the suggestion IDs, or wait until relearning proposes something new.
Approve says no suggestion for "..." or an edited suggestion stays learned (422)
- Cause: an edited rule's endpoint has no current suggestion (not ready, renamed by folding, or gone), or it was sent with
source: manual. - Fix: send edited rules only for listed suggestions. Add manual rules to the
positive_ruleslist instead.
Approve answers 409 (conflict)
- Cause: the policy changed after the version you sent as
base_version. - Check: the error on Learning or in
waap learning approve. The CLI printsSuggestions re-read at policy version .... The UI re-reads suggestions and disables the stale dialog. Nothing retries approval automatically. - Fix: close the dialog and review the current queue. Reopen it, preview the impact and the diff, then approve. In the CLI, read
waap learning suggestions, preview again and repeat the command explicitly. Manual rule conflicts work the same way in the UI: close and reopen the form. CLI rule edits need a review ofwaap positive rules listbefore the command is repeated. Approval uses the suggestion'sversion; manual edits use the rule list'sversion.
Approval or rule Apply disappears after editing a form
- Cause: the policy diff no longer describes the pending edit. Changing preview settings also clears the current-rules impact result.
- Check: review the edited fields and any API validation error below the preview button.
- Fix: choose Preview approval (impact plus diff), or Preview changes for manual rules, again. Only the reviewed content can be confirmed. Viewers never see write buttons.
Approve or the rule list is refused with positive.rules[N]... (422)
- Cause: a rule does not validate. Typical messages: the endpoint is not
METHOD /path(upper-case method, a path starting with/, variables as whole segments{name}); it duplicates another rule; a path parameter is not a variable of the template; a type or character class name is unknown;length.maxis belowlength.min; an enum value repeats; or apatternis on a learned rule or is not RE2 (no look-around or back-references). Limits: 5,000 rules, 128 parameters, 256 enum values, 1 KiB patterns. - Fix: correct the field named in the message. A dry run shows the result first.
The impact preview shows a range rather than one number
- Cause: observations keep shapes (types, length buckets, character classes), not values. When several checks may refuse the same request, or a length bucket straddles a rule bound, only bounds are known.
exact: falsemarks those counts. - Fix: read
refused.max(and rate) as the worst case. Tighten or widen the rule and preview again.
The preview counts many refusals for an endpoint I did not approve
- Cause: with
unknown_endpoints: refuse(or a preview with that enforcement), every endpoint without a rule, and every method of a path whose rule names another method, is refused (pos.endpoint.unknown,pos.method). - Fix: keep
unknown_endpoints: loguntil every endpoint has a rule, or approve the missing endpoints first.
The preview's recorded attacks show few or no catches
- Cause: events keep only a redacted snippet of the matched value, so value checks count only when the snippet proves the value out of profile. Escapes and masks (
\n,[REDACTED],****) are not evidence. Withconfirm_anomalieson, a value catch appears as refused if confirmed (caught_if_confirmedin JSON) only if the live classifier recognizes an attack in the untransformed snippet. Clipped, masked or escaped snippets are not classified. Events of the positive model itself are not counted, and at most 5,000 recent events are read. - Fix: treat the count as a lower bound. Widen the window (
days) if the attacks are older.
The preview lists unchecked patterns
- Cause: a manual rule has an RE2
pattern. Observations keep no values, so only live traffic can check it. - Fix: run the rule in detect mode first and watch its
pos.param.patternevents.
A request is refused by pos.*
- Cause: the request does not fit the endpoint's rule in
positive.rules. The event names the rule ID, the parameter (variable is the location, key is the name) and the expectation, for exampleexpected integer, 1 to 3 characters (learned rule). - Check:
waap events -app shop(or Events in the UI) for the reason;waap positive rules list -app shopfor the rule;waap learning preview -app shopfor how often it would refuse normal traffic. - Fix: if the request is normal, edit the rule (
waap positive rules edit, or Positive rules, then Edit): widen the length, or add the character class or enum value. For a parameter that is free text by nature, add an exception withignore_rules: [pos.param.charset]andin: ["param:json.note"]. While investigating, set the module to detect (waap learning set -app shop mode=detect) or stage the rule (staged_rules).
pos.endpoint.unknown or pos.param.unknown events for normal traffic
- Cause: the endpoint or parameter has no rule yet. With
unknown_endpointsandunknown_parametersatlog(the default), these only record and pass. Learning keeps observing such requests and suggests rules once its thresholds are met. - Fix: approve the suggestion when it appears, or add a manual rule. Set
refuseonly when the rules cover the whole application (checkunknown_endpointsin the preview).
pos.method for a method the application uses
- Cause: a rule exists for the path, but not for this method. Rules are per method.
- Fix: approve the method's suggestion, or add a manual rule
METHOD /template.
pos.param.missing though the parameter was sent
- Cause: the name or location differs from the rule. JSON leaves are dotted (
user.email), arrays use[](items[].qty), headers are matched without case and cookies with case. Or the parameter sits in another location (query versus form). - Check: the rule's
inandnameagainst the request. Missing parameters are not reported when the body was cut at the buffer limit, did not parse, or the request had more parameters thanlimits.arguments. - Fix: correct the rule's name or location, or make the parameter optional.
Value violations only log (unconfirmed) in block mode
- Cause:
confirm_anomaliesis on (the default). Type, length, character and enum violations refuse only when the bounded classifier also finds an attack class. - Check: the event's
unconfirmed: no attack class matchedmessage. SQLi and XSS use libinjection. Traversal, command and template checks recognize specific markers in the first 4 KiB. Plain placeholders, prose and attacks outside that prefix may not match. A later signature event does not change the positive finding. Unconfirmed values go into the parameter's drift lane and widen the profile only after enough distinct clients have sent them. - Fix: turn
confirm_anomaliesoff to refuse every value outside the rule. Preview first withwaap learning preview -app shop -no-confirm. In Learning, Enforcement, clear Refuse odd values only when they look like an attack, choose Preview changes, then Apply. This is stricter. Use default restores it. Viewers see read-only settings and can preview the impact, but an operator must apply. Patterns, content types, missing parameters and methods never need confirmation; staging and scoped exceptions still apply. See the positive model enforcement guide for the classifier.
Use default still shows confirmation off, or Staged rules rejects pos.*
- Cause: an older UI showed an empty reset value as unchecked, and only accepted signature, API and bot rule names in staging inputs.
- Check: in Learning, Enforcement, set confirmation off and select Use default; the checkbox should show on. Enter
pos.param.*and a Staged until duration such as168h; the preview should accept it. - Fix: in a source checkout, rebuild with
make ui, rebuild and restart the serving binary, then reload the page. Preview, then apply. A reset sendsconfirm_anomalies=and removes the explicit setting. Text, number and list inputs stay empty after Use default or when cleared; their grey placeholder shows the default that applies.
A value is refused with confirmed: sqli, xss, path_traversal, cmdi or ssti
- Cause: a type, length, charset or enum violation also matched an attack class.
- Check: the positive rule ID, location, parameter name and expectation. Snippets stay redacted even for confirmed values. In detect mode the event says
would_block; a staged rule logs until its deadline. Prose that only resembles a command (dogs; cat people, a line startingSleep well) is notcmdi. A word followed by an option, path, number or host (; sleep 5,| ping -c 1 host) is. - Fix: for a legitimate value, correct that parameter's profile or add a scoped
pos.param.*exception forparam:LOCATION.NAME. Preview the rule change first. Turning confirmation off makes enforcement stricter and does not fix this refusal.
Staged positive rules still refuse, or staged_rules is rejected
- Cause:
staged_untilis in the past or empty (staging needs both settings), or the list names something that is not a positive rule. Positive rules cannot be staged in the signature section'sstaged_rules. - Check:
waap learning get -app shopshowsstaged_rulesandstaged_until. - Fix:
waap learning set -app shop staged_rules=pos.param.* staged_until=168h.
An exception with param: fields is rejected
- Cause:
param:fields areLOCATION.NAME, where the location is path, query, header, cookie, form, multipart, json or xml. They go with named rules (pos.*,api.*), not with signature rule numbers. - Fix: write
param:json.items[].qty, and put signature rules in a separate exception.
Violations are empty or attributed to no endpoint
- Cause: the summary reads only positive model events (
pos.*) of the application in the window, at most 5,000 of the newest. It attributes them with the current rules. An event for an endpoint whose rule was removed, or never existed, has no endpoint, so an endpoint filter matches only the exact path. - Check: Learning, Violations, or
waap learning violations -app APP -days 30: the examined count, the truncation note and the samples' endpoint. The API equivalent isGET /v1/apps/APP/learning/violations?days=30. Compare withwaap events list -app APP -rule pos.param.type. - Fix: widen
days(up to 90), or narrow with-endpoint 'METHOD /template'. The UI uses the selected endpoint's covering rule; for a wider rule, use that endpoint in the CLI too. Choose All endpoints to clear the UI filter. Whentruncatedis true, narrow the day window instead of relying on totals. The endpoint filter is applied after the newest 5,000 application events are read, so it cannot recover older events.
Violations says Days must be a whole number from 1 to 90
- Cause: the input is empty, fractional, zero or outside the allowed range. The CLI reports
-days must be 1 to 90, or a flag parse error for non-integers. - Check: Learning, Violations, Violation days, or
waap learning violations -h. - Fix: enter a whole number from 1 to 90. The default is 7. Invalid UI values send no request. In the CLI, use
waap learning violations -app APP -days 7.
Edit-from-event says the event is not found
- Cause: the event belongs to another application, has no positive model finding (for example a signature refusal), was pruned by event retention, or the ID is not the transaction ID.
- Check:
waap events show ID: the application and each reason's module. - Fix: open it from the right application. For other modules, use
POST /v1/events/ID/exception. A shown rule is the current one; ifruleis absent, the endpoint has no rule now (add_endpoint).
Edit-from-event says Policy changed, or preview or apply returns 409
- Cause: the event's current-policy comparison and the fetched rule list have different versions, or the policy changed after the form opened. An old index could now refer to another rule. No write is retried automatically.
- Check:
waap learning event -app APP -id ID -jsonshowsversion. Compare it withwaap positive rules list -app APP -json. The UI displays the current-policy version. - Fix: close the rule form, choose Reload event, review the current rule and learned profile, reopen the fix form and preview again. For an exception conflict, cancel and propose it again before applying.
A fix says Current rule is unavailable or Current parameter is unavailable
- Cause: the returned rule or parameter index cannot be found in the current list.
- Check: reload the event and inspect its current rule and finding indexes with
waap learning event -app APP -id ID -json. - Fix: reload and review before retrying. If it persists, report the event ID and policy version. The UI refuses to open a form at an unrelated index.
A fix says the rule already has 128 parameters or the policy has 5000 positive rules
- Cause: an add-from-event fix would exceed the existing policy limits.
- Check: Positive rules, or
waap positive rules list -app APP -json. - Fix: review and edit or remove existing entries before adding. The limits are unchanged.
Positive CLI says already exists; use edit or not found; use list
- Cause:
addwould duplicate an endpoint, oreditorremoveselected an absent endpoint. - Check:
waap positive rules list -app NAME -json. Quote the exactMETHOD /template. - Fix: use edit for an existing rule and add for a new one. Use the existing endpoint as
-endpoint, even if the replacement file renames it. No write was sent.
Positive CLI says reading positive rules, expected one YAML or JSON document, or endpoint is required
- Cause: invalid YAML or JSON, an unknown field, several documents, or the wrong file shape. Approval's
-frequires a non-empty list (edited rules: provide a non-empty list). Positive add and edit require one mapping with an endpoint. File size uses the configuration limit (configuration is larger than ... bytes). - Check: compare the file with the positive rule example in the positive model guide.
- Fix: correct the names and types, keep one document, and use a list only for edited approval. An edited approval stays learned; manual patterns belong in
positive addoredit.
Learning CLI shows usage, -days must be 1 to 90, or non-empty suggestion IDs
- Cause: a missing app, several selection forms, a missing approval selection, invalid days, an empty ID, or more than 1,000 IDs. Positive rule add and edit also require
-f; edit and remove require-endpoint. - Check:
waap learning approve -h,waap learning preview -horwaap positive rules edit -h. All flags precede any positional values. - Fix: choose just one of repeated
-id,-allor-f; preview alone may have no selection. Set days to 1 to 90 and send 1 to 1,000 non-empty IDs. Usage errors send no API call.
These entries concern the end-to-end and browser acceptance tests and the UI build, not production use.
Acceptance test says cannot unmarshal array into Go value for positive rules
- Cause: the test decoded
waap positive rules list -jsonas an object withitems. The CLI command returns an array of rules; the management API returns the wrapper. - Check: inspect the command's JSON output and the test's destination type.
- Fix: decode the CLI output into a rule slice. Keep the backend and API unchanged.
Learning browser acceptance times out selecting the Events application
- Symptom: Playwright waits for
getByLabel('Application', { exact: true }), although the Events page snapshot shows an Application combobox with theapioption. - Cause: the wrapping label includes the select's option text, so the exact label-text locator does not match. The combobox's accessible name is still Application.
- Check: inspect the Playwright page snapshot and call log. The approval and the Envoy refusal completed before this test locator failed.
- Fix: select by role and accessible name,
getByRole('combobox', { name: 'Application', exact: true }). Keep the Events filter and refusal assertions. Do not increase the timeout or change backend code.
Browser console guard reports a 401 before sign-in
- Cause: a fresh browser context requests
/v1/auth/sessionwithout a session cookie. The login screen expects the resulting 401. A guard started before sign-in treated this expected check as an error in the learning workflow. - Check: verify the request URL, status and timing. A 401 after sign-in is a different failure and must still fail the workflow's console guard.
- Fix: assert explicitly that the initial session check returns 401, sign in through the form, then attach the console guard before navigating to the application. Keep the guard and all learning, refusal, explanation and viewer assertions.
UI checks fail with ENOTEMPTY, TAR_ENTRY_ERROR ENOENT, or tsc: command not found
- Cause:
make uiandmake ui-testwere run together. Both runnpm ciin the same directory, so one can remove files while the other installs or compiles them. - Check: wait for both commands to finish, and check whether their install times overlap.
- Fix: run
make uito completion, thenmake ui-test. Each reinstalls the pinned packages. Also finishmake uibefore any Go checks that embed its output. Do not change package versions or lockfiles to repair this collision.
A rule is not widened although the application now sends other values
- Cause: values outside a rule are kept in the parameter's drift lane and join its profile only when at least
learning.min_clientsdistinct clients sent at least a fifth oflearning.min_samplessuch values. Values refused (confirmed attacks, or any value withconfirm_anomaliesoff), requests flagged by another module and answers of 400 or above are not learned at all. - Check: the parameter's Drift column in Learning,
waap learning model -app NAME -endpoint 'METHOD /template', orGET .../learning/model/endpoint:drift.values,drift.clientsanddrift.accepted. The evidence line says how many values and clients are still missing. The suggestion showswidenedonce accepted. - Fix: wait for more traffic, or lower
learning.min_clientsif few clients really use the application. To widen at once, edit the rule from the event (Violations, then View fixes).
A rule is proposed for removal though the endpoint is used
- Cause: a removal is proposed when the endpoint had no learned request for 30 days. Requests the rule refuses (wrong content type, missing parameter, pattern) or that other modules flag are not learned, so an endpoint whose every request breaks its rule looks unused. A literal rule that the model now folds into
{var}becomes a folded change instead. - Check: Violations filtered to that endpoint, and the removal's
last_seenand evidence. - Fix: reject the removal (the rule stays, and the rejection is remembered), and fix the rule from a violation event.
Approve says no removal suggestion or is approved and removed in one approval (422)
- Cause: the removal ID is not proposed now (the endpoint was seen again, the rule was removed, or it is manual), or the same endpoint is both approved and removed in one request.
- Check: Learning, Removals, the Removals table in
waap learning suggestions -app NAME, orGET .../learning/suggestionsand itsremovals. - Fix: reload the suggestions and send only current removal IDs, separately from approvals of the same endpoint. Removals must be restored first if they were rejected.
A relearning removal approval reports 409 or will not enable Apply
- Cause: the policy changed after the queue was read, so its
base_versionis stale. The shared approval dialog requires an impact preview and a dry-run policy diff before Approve rules appears. A conflict disables that preview, and no write is retried. - Check: the dialog error and the policy version. Suggestions are re-read after a 409. In the CLI, a failed approval prints the error and re-reads the suggestions before exiting.
- Fix: close the dialog, review the refreshed Removals list, open Approve removal... again, then choose Preview approval. In the CLI, review
waap learning suggestions -app NAME, preview withlearning preview -remove ID, then dry-run and approve using the current removal IDs. Approve all new deliberately excludes removals; it does not replace explicit removal approval.
Relearning test fixtures fail to compile
- Symptom: TypeScript reports
Property 'current' does not existor widened string statuses on a mixed suggestion fixture. Go reportsunknown field EndpointModel in struct literal. UI lint reportsForbidden non-null assertion. - Cause: the fixture's array inferred a union, or treated the
LearningEndpointtype alias as an embedded struct. These are test fixture errors, not API changes. - Check:
cd web && npm run typecheck, andgo test -tags re2_cgo ./cmd/waap -run TestLearningRelearning -count=1. - Fix: type the suggestion fixture as
Suggestions. InitializeLearningEndpointdirectly with the endpoint fields. Use explicit missing-element guards in tests rather than non-null assertions. Keep the API shapes and assertions intact.
Relearning JSON prints a literal terminal control, or a 409 test expects only the API message
- Symptom: a hostile-text assertion finds a literal right-to-left override in JSON, or a removal conflict assertion receives
The configuration changed meanwhile. Reload and try again.before the server's message. - Cause: Go's JSON encoder leaves Unicode format controls literal, and the shared UI error component adds context to 409 responses. Decoded JSON values must still round-trip.
- Check: the relearning CLI hostile-value and JSON tests, and the removal 409 component cases.
- Fix: use the existing learning JSON printer, which escapes format controls without changing decoded fields. Assert the complete shared 409 message, keeping the checks for re-reading, disabled approval and no automatic write retry.