Skip to content

Inconsistent Webserver Validation Results#57

Open
austinmatherne-wk wants to merge 1 commit into
masterfrom
webserver-remapping-reset
Open

Inconsistent Webserver Validation Results#57
austinmatherne-wk wants to merge 1 commit into
masterfrom
webserver-remapping-reset

Conversation

@austinmatherne-wk
Copy link
Copy Markdown
Contributor

Hi @freddym56,

We received a support email regarding inconsistent EDGAR validation results from the webserver. The issue is that mappedPaths is reset on each request, so the __xule_resources_dir__ mapping registered once in init() is lost after the first request. This can be avoided by moving the registration outside the once-only guard so it re-registers on every call, with a duplicate check for idempotency.

The issue can be replicated by running:

# start server
python arelleCmdLine.py --webserver localhost:8080 &

# first request returns validation results
curl 'localhost:8080/rest/xbrl/validation' \
    --get \
    --output first-request.json \
    --data-urlencode 'file=https://www.sec.gov/Archives/edgar/data/1445305/000144530525000142/0001445305-25-000142-xbrl.zip' \
    --data-urlencode 'media=json' \
    --data-urlencode 'plugins=EDGAR|xule' \
    --data-urlencode 'disclosureSystem=efm-pragmatic'

# second request triggers: xule:ValidationException - No such file or directory: '/__xule_resources_dir__/dqcrt-us-2025-ruleset.zip'
curl 'localhost:8080/rest/xbrl/validation' \
    --get \
    --output second-request.json \
    --data-urlencode 'file=https://www.sec.gov/Archives/edgar/data/1445305/000144530525000142/0001445305-25-000142-xbrl.zip' \
    --data-urlencode 'media=json' \
    --data-urlencode 'plugins=EDGAR|xule' \
    --data-urlencode 'disclosureSystem=efm-pragmatic'

first-request.json
second-request.json

DisclosureSystem.select() clears mappedPaths on each request, so the
__xule_resources_dir__ mapping registered once in init() was lost after
the first request. Move the registration outside the once-only guard
so it re-registers on every call, with a duplicate check for idempotency.
@freddym56
Copy link
Copy Markdown
Contributor

We couldn't include this change in the final version of release 26.1 but we will add to a future release.

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