Does a player know the source of an unseen force attempting [and failing] to act upon their mind? More in description

If a creature attempts to Dominate, deal save-or-suck psychic damage, or otherwise psychologically influence a PC, what do they know about the attempt? Both RAW and opinion answers acceptable, just specify what you’re giving.

Obviously the player themselves know when I ask "Make an x save".

But does the character know? Furthermore, what if it is a visible target. I don’t know if "Mind Blast" is visible, as an example, but ASSUMING it isn’t, say a PC angers a Mind Flayer, and they fail to deal damage to a PC because of a successful saving throw, does the PC know? "The Mind Flayer gives you an unsettling glare. Make an Intelligence saving throw. PC succeeds" Does the character itself know their mind was assailed in some capacity?

Lastly, suppose a PC is immune to a specific effect. I.e. being innately immune to Sleep effects.

Do they know if a creature attempted to use some magical ability to attempt to put them to sleep?

Data Schema For Stock Control / Multi Source Inventory

I’m working on a project that involves stock control with multiple stock sources and sales channels. The overall hierarchy I’ve got so far looks like this;

Sales Channels <---- Allocated Stock Sources <---- Stock Locations (warehouses) <--- Stock Sub Locations <---- Shelf / Bin Locations 

As far as rules go for how these entities relate to each other I’ve come up with this;

The system must have one or more sales channels, each sales channel must have 1 or more stock sources, a stock source must have 1 or more stock locations (warehouses / buildings / distribution centres ), a stock location may have 1 or more Bin/Shelf locations.

A product may have 1 or more stock locations, may have one or more sub locations in those stock locations and may have one or more Shelf / Bin location.

First off, is this a solved problem where some reference schema exists I could utilise and save myself some headaches?

If there isn’t a reference design for this situation, Am I best to build a 1 to Many relationship to assign stock to a sub location(s) and another 1 to Many relationship for Shelf Locations (if exists)

Can a frightened creature freely circle the source of its fear?

A frightened creature A is standing horizontally or vertically next to the source of its fear B.

The creature can’t willingly move closer to the source of its fear.

Can A freely circle B, for example to flank them or to attack another of its enemies, or to pass them with impunity in a 10′ hallway (subject to AOO rules as normal of course)?

I am asking, because this seems somewhat counter-intuitive: If you are next to the source of your fear, the fear does not practically restrict your movement. I hope there’s something in the rules or maybe sage advice which clarifies this, other than just lack of restrictions that would apply.

How many shortest paths are there from source to destination?

I am not sure if my question is clear or not to you. In fact this question is not clear to me. My university teacher has assigned this question to me.

Can you answer it? or need clarification like- if the graph is directed edged or not, if they are weighted or not, which algorithm will be used?

I have no such information. Only the question.

Source of RegEx examples of Secret Detection patterns in repositories?

Where can I find RegEx that can pattern match common secret strings?

I have a product that scans repos and commits and in case a developer tries to commit a secret (i.e. passwords, keys). It scans for roughly 30 patterns by default which seems insufficient given thousands of repos in over seventy languages. I can expand that scanning with RegEx. However, I don’t know every common secret there is.

Is there a framework, list, or tool that can provide RegEx or patterns for likely secrets?

Where can I get comprehensive lists of secret types?

Or am I doomed to writing a metric ton of RegEx then being held responsible for when something is missed?

Can a FOREIGN KEY be referring to the same table as the “source”?

I was sure that I had done this countless times, but I can’t find any previous use of me doing this. But it seems to make perfect sense, so I assume that it must be possible? However, the manual says:

A foreign key constraint specifies that the values in a column (or a group of columns) must match the values appearing in some row of another table.

Emphasis mine. Source: https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK

I have a table for bookkeeping, and whenever a transaction "corrects" or "updates" a previous one, I have a column called "corrects id" which is a bigint and, to me, makes perfect sense to have as a FOREIGN KEY as such:

..., FOREIGN KEY ("corrects id") REFERENCES bookkeeping (id) 

Note: "corrects id" is a column in the "bookkeeping" table, and id is the primary key (bigserial) of the same table.

Surely this is correct? So why does the manual say that it has to be another table? And why is the name "FOREIGN" keys if you can refer to the same table?